Skip to content

Allow advanced search to return results when no query is present#3810

Merged
sandbergja merged 1 commit intomainfrom
3809-advanced-search-returns-zero-results-with-blank-query
Mar 18, 2026
Merged

Allow advanced search to return results when no query is present#3810
sandbergja merged 1 commit intomainfrom
3809-advanced-search-returns-zero-results-with-blank-query

Conversation

@mamrey
Copy link
Copy Markdown
Contributor

@mamrey mamrey commented Mar 18, 2026

When making an advanced search with an empty query, the search builder switches to the lucene defType, which doesn't recognize the default q.alt configuration used to return all results with an empty query for a standard search. We can address this by making the guard clause that controls the switch to the lucene defType more robust :

Do not switch to lucene if the clause params are blank OR all the query values within the clause params are blank

Screenshots

Below, is a search for records with the format facet "Book" on the advanced search form. Without a query value present, the search returns the expected records.

adv_search_showing_facet_count working_blank_query_facet_search

Copy link
Copy Markdown
Contributor

@sandbergja sandbergja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mamrey !

@sandbergja sandbergja merged commit 0e12a84 into main Mar 18, 2026
12 checks passed
@sandbergja sandbergja deleted the 3809-advanced-search-returns-zero-results-with-blank-query branch March 18, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants