lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Gluzberg" <drag...@apache.org>
Subject Re: PLEASE REVIEW: Updated Query Parser Syntax
Date Wed, 15 May 2002 15:26:24 GMT
Sorry, I should have been more clear.

As far as I understand, NOT is an unary operator, and applies to the to the
term that follows it.
So:
NOT "bye bye"
is a valid query and will find all documents that do not have the phrase
"bye bye"

if you want to do find all documents that have the set difference between
hello and "bye bye" you will have to use the query:

hello AND NOT "bye bye"

Also it follows that,
hello NOT "bye bye" is equivalent to:
hello OR NOT "bye bye"

So the query hello NOT "bye bye" will find all documents that either have
hello OR do not have "bye bye"

In your description you said:
  The NOT operator excludes documents that contain the term after NOT. This
is equivalent to a difference using sets. For example to search for
documents that contain "Microsoft Word" but not "Microsoft Excel":

       "Microsoft Word" NOT "Microsoft Excel"

The correct way of doing that would be:
"Microsoft Word" AND NOT "Microsoft Excel"

----- Original Message -----
From: "Peter Carlson" <carlson@bookandhammer.com>
To: "Lucene Developers List" <lucene-dev@jakarta.apache.org>
Sent: Wednesday, May 15, 2002 10:43 AM
Subject: Re: PLEASE REVIEW: Updated Query Parser Syntax


> Do you think this should be stated more directly as an option?
>
> It seems like the "OR NOT" is more confusing.
>
> Or are you making the point that this is not "AND NOT" meaning that
> "Microsoft Word" is not required?
>
> --Peter
>
>
> On 5/15/02 7:30 AM, "Eugene Gluzberg" <drag0n2@apache.org> wrote:
>
> >
> > "Microsoft Word" NOT "Microsoft Excel"
> >
> >
> > My understanding of query parser this query would be the same as:
> > "Microsoft Word" OR NOT "Microsoft Excel"
> >
> > Same with the -
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message