-
Notifications
You must be signed in to change notification settings - Fork 125
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
WildcardQuery do not work? #106
Comments
Just some new aspects: |
That is not universally true, and would depend on the analyzer used for the field. To debug specific issues of working/not-working it is most helpful to provide a runnable example. Too many behaviors depend on the actual data, and the configuration of the analyzers. |
Hi, Here is some sample code: In line 61 change code from "BL*" tp "bl*" and you will find the doc. |
Great, so what is the issue now? |
As you can see, the body contains the text bluge... |
And even if i'm using |
There is a fundamental difference between how match queries and wildcard queries work, but it has to do with the application of an analyzer to the search term. This indirectly leads to the behavior you are seeing, but I will again say it is wrong think that all wildcard searches are lower-case. When you do the following match queries:
The search terms are analyzed, that means the in BOTH cases, we are actually searching the index for
The wildcard query does NOT analyze the search term. Because the analyzer you are using makes all index terms lower-case, the first query will never match anything. That is not a bug, that is working as expected. Earlier, you had said, "if there is a wildcard in place, the term should be in lower case". And that is not true generally, it is true because you are using the standard analyzer on your text. If you had used a custom analyzer that did not lower-case all the input, and there were terms with upper-case letters, you could use them in your wildcard pattern, and they would work as expected. |
Ok. I understand. |
Basically the wildcard search does not directly do what you want, I see 2 choices:
Neither of these changes are easily used by the query string package, so you'd likely have to maintain your own version of that too. |
Sorry I can only reply now. Easter holidays! |
Just a short question: Is the WildcardQuery already working?
Because, i have a doc index with a text field called X-Tenant, value is MCS
Search with
X-Tenant: MCS
will find this docbut
X-Tenant: M*
will not find anything.Nor
MC?
orM??
The text was updated successfully, but these errors were encountered: