lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Use of "+" and "-" in queries
Date Tue, 07 Sep 2004 22:53:12 GMT
Hi Bill,

No difference, it's just that Lucene's query syntax recognizes both
'NOT' and '-' and uses them the same way - to exclude certain documents
from sesrch results.

Otis

--- Bill Tschumy <bill@otherwise.com> wrote:

> I don't understand the difference in using + and - in queries
> compared 
> to using AND and NOT.  Even the Query Syntax document seems a bit 
> confused.  In the section on the NOT operator it says:
> 
>  > To search for documents that contain "jakarta apache" but not 
> "jakarta lucene" use the query:
>  >
>  > 
>   > "jakarta apache" NOT "jakarta lucene"
>  >
> 
> Then in the section on the - operator you read this:
> 
>  > To search for documents that contain "jakarta apache" but not 
> "jakarta lucene" use the query:
>  >
>  > 
>   > "jakarta apache" -"jakarta lucene"
>  >
> 
> So what's the difference?
> 
> -- 
> Bill Tschumy
> Otherwise -- Austin, TX
> http://www.otherwise.com
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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