lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Problem with NOT and OR Query
Date Tue, 16 Jun 2009 15:46:29 GMT
NOT isn't a boolean operator, which is a source of continuous confusion.
See:
http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#NOT

for a part of the explanation, and
http://wiki.apache.org/lucene-java/BooleanQuerySyntax

Best
Erick

On Tue, Jun 16, 2009 at 11:24 AM, Sumanta Bhowmik <
sumanta.bhowmik@guavus.com> wrote:

> Hi
>
>
>
> I found that a query "NOT num_pkts:1024  OR src_port:80" behaves the same
> as
> "NOT num_pkts:1024  AND src_port:80". The actual query is
>
>
>
> (start_utc:[1230748200 TO 1230768000] OR end_utc:[1230748200 TO
> 1230768000])
> AND (num_pkts:1024  OR NOT num_bytes:40960) but it behaves as if it is
>
>
>
> (start_utc:[1230748200 TO 1230768000] OR end_utc:[1230748200 TO
> 1230768000])
> AND (num_pkts:1024  AND NOT num_bytes:40960).
>
>
>
> Is this a known issue?
>
>
>
>
>
> Is there a workaround to this problem?
>
>
>
> Thanks
>
> Sumanta
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message