Re: Lucene query behavior using NOT

2015-02-08 Thread Trejkaz
On Sun, Feb 8, 2015 at 9:04 PM, Uwe Schindler wrote: > Hi, > > Lucene does not use algebraic / boolean logic! Maybe review this blog > post: https://lucidworks.com/blog/why-not-and-or-and-not/ This article is an old classic. The "plus, minus, nothing" operators aren't without their issues either

RE: Lucene query behavior using NOT

2015-02-08 Thread Uwe Schindler
lliker [mailto:ikoelli...@axsone.com] > Sent: Friday, February 06, 2015 10:47 PM > To: java-user@lucene.apache.org > Subject: Lucene query behavior using NOT > > Hello, > I am trying to understand whether I am using the NOT operator correctly. I > have the following scenario: >

Lucene query behavior using NOT

2015-02-08 Thread Ian Koelliker
Hello, I am trying to understand whether I am using the NOT operator correctly. I have the following scenario: Query 1 = body:(a OR NOT b) This is parsed as: (body:a) -(body:b) and finds 96,620 hits Query 2 = body:(a OR (*:* AND NOT b)) This is parsed as: (body:a) (+*:* -(body:b)) and finds 1