lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Atamer" <aata...@casebank.com>
Subject QueryParser handling a NOT query on its own
Date Mon, 21 Jun 2004 11:38:34 GMT
The Javadoc spec calls for one or more clauses in a query, but I had trouble
with a NOT query just on its own. For example

QueryParser.parse("my_field:-exclude") throws a parsing exception

Same with

QueryParser.parse("my_field:-(exclude)")
QueryParser.parse("my_field:(* AND -exclude")

The query QueryParser.parse("my_field:(-(exclude))") gives a legitimate
query that brings no results.

What I would expect is the following: If I have an index with 100 total
entries, and 20 records with the word "exclude" in them, then the above
queries should give 80 hits. There is no test case for this scenario in
TestQueryParser. Please confirm whether this is a bug or not,

Thank you,

Allen Atamer


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message