Question about the "not" in lucene

2006-11-25 Thread christophe leroy
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

Re: Question about the "not" in lucene

2006-11-25 Thread Mark Miller
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

Re: Question about the "not" in lucene

2006-11-27 Thread hawat23
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

Re: Question about the "not" in lucene

2006-11-27 Thread Mark Miller
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