You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common problem that arises in query parsing is what to do when analysis strips all the terms from the input string. For example, when the query is just "i" or even something more complex like "i AND you", stopword analysis will leave a clause without any terms.
In this situation, both Lucene and ElasticSearch view the clause as an empty-set of terms which matches nothing. However users often would prefer the clause to instead be a MatchAll Query, matching every document.
Currently MatchQuery has hardcoded behaviour that uses MatchNoDocsQuery in this situation. Instead we should allow users to provide a flag as part of a match query that gives them control over what to do when there is an empty-set clause.
The text was updated successfully, but these errors were encountered:
Will add a flag zero_term_docs to the match query, which accepts two possible values, none which replicates the existing behaviour and will be the default and all which will create a MatchAllDocsQuery instead.
A common problem that arises in query parsing is what to do when analysis strips all the terms from the input string. For example, when the query is just "i" or even something more complex like "i AND you", stopword analysis will leave a clause without any terms.
In this situation, both Lucene and ElasticSearch view the clause as an empty-set of terms which matches nothing. However users often would prefer the clause to instead be a MatchAll Query, matching every document.
Currently
MatchQuery
has hardcoded behaviour that usesMatchNoDocsQuery
in this situation. Instead we should allow users to provide a flag as part of amatch
query that gives them control over what to do when there is an empty-set clause.The text was updated successfully, but these errors were encountered: