Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Dismax Parser, provide proper wildcard defaults for when "q" is empty. #535

Open
kaladay opened this issue Feb 15, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kaladay
Copy link
Contributor

kaladay commented Feb 15, 2023

Describe the bug
The Dismax Parser does not support wild cards * (U+002A).

The current query logic in SolrDiscoveryService.java adds the wildcard filter to the query itself and is not Parser aware.

Searching with an empty q produces no results.

Based on the documentation, the q.alt parameter should be used for this purpose and the wild card must not be put in the q parameter.

This is also true for the Edismax Parser, but this must no be done for the Lucene Parser.
The Lucense Parser does not support q.alt and adding a default to the q for when it is empty might be the correct action.

Until this is resolved, the Dismax Parser should be avoided or the default filter should be empty in the Discovery View.

The behavior of field-specific wildcard search should still be preserved.

Such as searching for q=origin:*, which should not become q.alt=origin:* for the Dismax Parser and the Edismax Parser.

Take care with the Lucense Parser as the q is required by that parser.

To Reproduce
Steps to reproduce the behavior:

  1. Read the referenced solr documentation.
  2. Got to the solr panel and experiment with the queries, such as: debug=query&defType=dismax&sow=true&rows=0 and q.alt=*&debug=query&defType=dismax&sow=true&rows=0.
  3. See results.

Expected behavior
We should have consistent behavior between each of the parsers and the filter from the Discovery View should be properly used.

Additional context
see: https://solr.apache.org/guide/solr/latest/query-guide/dismax-query-parser.html#q-alt-parameter
see: https://solr.apache.org/guide/solr/latest/query-guide/standard-query-parser.html

@kaladay kaladay added the bug Something isn't working label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant