lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <scott.ga...@etapestry.com>
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.

Scott

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)
>or
>	ID:(+"ID10")
>
>It will returns some hits.
>
>However, if I try
>
>	ID:(-ID10)
>or
>	ID:(-"ID10")
>
>I got an empty result set, which should have some records.
>
>Any idea how to use this prohibit operator?
>
>Regards,
>Lixin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>  
>

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



---------------------------------------------------------------------
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