[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-dev
Subject:    DO NOT REPLY [Bug 15739] New:  -
From:       bugzilla () apache ! org
Date:       2002-12-31 14:48:16
[Download RAW message or body]

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15739>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15739

Query parser inconsistency when using terms to exclude.

           Summary: Query parser inconsistency when using terms to exclude.
           Product: Lucene
           Version: 1.2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: QueryParser
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: carlos_aller@condisline.com


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

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic