You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by poeta simbolista <po...@gmail.com> on 2007/02/01 14:11:20 UTC
Use of only a prohibit search
HI guys,
I've read on
http://www.nabble.com/Using-NOT-queries-inside-parentheses-tf1234775.html#a3272973
this forum about the problem of using, for example, only a prohibit search
such as
-description:plot
I really would like to get this done on a good manner, I am constructing
queries where elements may vary greatly.
I am using 1.9.1 at the moment. Is the solution provided in the post I
linked still the best one "nowadays" (it was stated for 1.4) ? I find that
a bit "hacky" for such an operation, though...
Thanks a lot!
D
--
View this message in context: http://www.nabble.com/Use-of-only-a-prohibit-search-tf3154742.html#a8747868
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Use of only a prohibit search
Posted by Chris Hostetter <ho...@fucit.org>.
Adding a MatchAllDocsQuery instance to your boolean query if all clauses
are prohibited is in fact still the best way to do a purely negative
query.
the trunk makes this easier by adding MatchAllDocsQuery syntax to the
query parser...
*:* -description:plot
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org