Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.2
-
None
-
None
-
Operating System: All
Platform: PC
-
15739
Description
Hi.
The problem I am having occurs when using queryparser and also when building the
query using the API.
Assume that we want to look for documents about fruits or vegetables but
excluding tomatoes and bananas. I suppose the right query sould be:
+(fruits vegetables) AND (-tomatoes -bananas)
wich I think is equivalent to (if tou parse it and then print the query.toString
("") result that is what you get)
+(fruits vegetables) +(-tomatoes -bananas)
but the query doesn't work as expected, in fact the query that works is
+(fruits vegetables) -(-tomatoes -bananas)
which doesn´t really make much sense, because the second part seems to say:
All documents where the condition "tomatoes is not present and bananas is not
present " is false, which means the opposite.
In fact, second query works as (even if they look quite opposite):
+(fruits vegetables) -tomatoes -bananas
Hope someone could help, thanks
Attachments
Attachments
Issue Links
- is related to
-
LUCENE-666 TERM1 OR NOT TERM2 does not perform as expected
- Reopened