Redirecting to lucene-user....

--- Jim Hargrave <[EMAIL PROTECTED]> wrote:
> Can anyone tell me why these two queries would produce different
> results:
>  
> +A -B
>  
> A -(-B) 

A and +A are not the same thing when you have multiple terms in a
query.

> Also, we are having a hard time understanding why the Query parser
> takes this
> query: "A AND NOT B" and returns this "+A +(-B)". Shouldn't this be
> "+A -B"?

Maybe it should.  QueryParser is not the smartest piece of code,
unfortunately, and this issue has been discussed several times before. 
It looks like QP is just translating things 'nicely' left to right and
not looking for 'AND NOT' and turning that into '-'.

Otis

 The
> first gives incorrect results, the later works as expected.
>  
>  
> Jim 
>  
>  
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to