lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <>
Subject Re: usage of prohibit operator '-'
Date Thu, 17 Apr 2003 18:35:05 GMT
Lucene only searches for positive results, not negative.  If you think 
of the "-" operator as a subtraction, then you'll understand that Lucene 
requires that you also select something to subtract from.


Lixin Meng wrote:

>I am having some problems with the probhibit operator '-'. If anyone can
>shed some light on it, I certainly appreciate it.
>In the index, I have a field with field name 'ID'. It tried query like:
>	ID:(+ID10)
>	ID:(+"ID10")
>It will returns some hits.
>However, if I try
>	ID:(-ID10)
>	ID:(-"ID10")
>I got an empty result set, which should have some records.
>Any idea how to use this prohibit operator?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

"They who can give up essential liberty to obtain a little temporary safety deserve neither
liberty nor safety." - Benjamin Franklin

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message