You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by George Aroush <ge...@aroush.net> on 2005/01/04 17:53:04 UTC
A "not" query question
Hi folks,
In Lucene, how can I retrieve all documents that don't match the term of my
query? That is, I want all documents that don't have the word "CAT".
The only way I can think of how to do it now is to create a 'dummy' field
which always contains a known value, say "1" and than build a query like so:
("1" in dummy) AND (NOT "CAT")
Can I still achieve my goal without the 'dummy' field
Regards,
-- George Aroush
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org