Lucene unexpectedly gives different results when operator of search words changes
- by Lars Andren
I am using Lucene with Java. In the index I have a single document with a single name:value-field
text:alabama oklahoma
When I search for
+alabama -oklahoma
it returns no results, as expected.
However, when I search for
-alabama +oklahoma
it returns the single document as a match to the query.
Has anyone else noticed this behaviour? Any ideas on why this happens?