-
Notifications
You must be signed in to change notification settings - Fork 688
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
Match queries and field values only if both went through the same analyzer #2108
Comments
@k0ral Your expectation for this to work is right.
When I try your code with the latest version of bleve I see test cases 2, 3 and 4 failing because - you've set
Test output ..
Would you test this with the latest release version and confirm that you still see a situation? |
Thank you for taking the time to answer. I guess my original post wasn't clear enough, sorry for that. The values I used for Also, I should mention I'm using version 2.4.3, which is the latest release at this time I believe. |
(Full reproducible example at the end.)
I have trouble setting up
bleve
to achieve the specific use case described below ; it's not clear to me whether it's actually feasible, you tell me :) .I'm in a situation where I need to support:
case_insensitive("foo") AND exact("bar")
)I expect this is a matter of properly setting analyzers, but I'm not sure. I have created the following analyzers:
My understanding is that analyzers can be assigned to:
I can implement (1) alone by setting the
lowercase_words
analyzer to both the field and the match query.Similarly, I can implement (2) alone by setting the
exact_words
analyzer to both the field and the match query.However, I can't find a way to implement (3) : indeed, if I set both analyzers on the same field,
bleve
will match the exact match query against tokens on which the lowercase analyzer has been applied, which violates (2).In other words: I'm trying to have
bleve
match queries and tokens only if they went through the same analyzer. And I haven't found how to express that requirement using the current API.Can this use case be achieved with
bleve
? If so, how ? If not, any hints on how to patchbleve
to support it ?Full reproducible example
The expected values of below tests show the behavior I'm trying to achieve.
The text was updated successfully, but these errors were encountered: