Hello,
I don't understand how to use "not" with Lucene. I
think that it is not a boolean not. I read the
documentation but it is not clear enough on how the
"not" works.
For example, I tried to do this request:
type:product
--> I got 100 responses. It is normal. Then, I tried
this request:
type:p
Personally, I think of it as not a 'not' operator, but more a 'but not'
or 'and not' operator. Thats not totally the case I believe, but gives
you semantics that work. Truly I think that each part of the query
creates a score and the NOT query scores 0. That gives a different
result than a bool
Thanks you for your answer.
But, is it possible to group clauses with a "not". exemple:
type:product NOT (name:"toto" OR name:"titi") ??
Christophe
Mark Miller a écrit :
Personally, I think of it as not a 'not' operator, but more a 'but
not' or 'and not' operator. Thats not totally the case I
Yes, I believe that it is entirely possible. You can nest and link
boolean clauses all you want: your example query would be a boolean with
two top level clauses, one required to be there and one required not to
be there. The second top level clause would itself be a boolean query
with two two