-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Wildcard Query with Stop Words in Romanian Analyzer Generates MatchNoDocsQuery #114185
Comments
I replicated on latest with a simplified format.
This works. I think this is a bug in For example:
This is basically the same query and should result in the same, but it gets transformed into a match-none. FWIW, this is a general problem. Here is another failing example:
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Hi, |
The bug was introduced in https://issues.apache.org/jira/browse/LUCENE-10022 It was fixed in query_string, but never in simple_query_string: #35756 |
test to replicate the bug
In The fix should be like 3 loc. |
@halilbulentorhon go ahead and open a PR :) the fix should be simple, add the test ^ above and 3 lines in the simple query string parser to return |
…is empty (elastic#114264) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes elastic#114185 (cherry picked from commit 6955bc1)
…is empty (elastic#114264) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes elastic#114185 (cherry picked from commit 6955bc1)
…is empty (#114264) (#114355) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes #114185 (cherry picked from commit 6955bc1) Co-authored-by: Halil Bülent Orhon <[email protected]>
…is empty (#114264) (#114354) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes #114185 (cherry picked from commit 6955bc1) Co-authored-by: Halil Bülent Orhon <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…is empty (elastic#114264) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes elastic#114185
…is empty (elastic#114264) This change fixes analyzed wildcard query in simple_query_string when disjunctions is empty. Closes elastic#114185
Description
Hi,
On the Romanian analyzer, using a wildcard for a stop word in a simple_query_string generates a MatchNoDocsQuery, which prevents matching any documents. The expected behavior is to remove the stop word from the query instead of generating a
MatchNoDocsQuery
. This behavior seems similar to issue #1272.Environment
Steps to Reproduce:
Create an index with the Romanian analyzer:
Index a document containing the stopword "Pentru":
Search using
simple_query_string
with a wildcard:Observed Behavior
The search result returns no matches, and the query generates a
MatchNoDocsQuery
. The profile output shows:Expected Behavior
The stop word should be removed from the query, and the document should match as expected.
The text was updated successfully, but these errors were encountered: