You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Jeroen Venderbosch <jv...@woodwing.com> on 2013/01/21 13:34:31 UTC

different result for 'OR'

I would expect that the query *q=description:(electronics) or
description:(usb)* would give the same number of results as
*q=description:(electronics or usb)*. But the first query returns 9662
documents and the second one 9493. What is the difference?



--
View this message in context: http://lucene.472066.n3.nabble.com/different-result-for-OR-tp4035014.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: different result for 'OR'

Posted by Erik Hatcher <er...@gmail.com>.
OR should be in all caps there.  

   Erik

On Jan 21, 2013, at 7:34, Jeroen Venderbosch <jv...@woodwing.com> wrote:

> I would expect that the query *q=description:(electronics) or
> description:(usb)* would give the same number of results as
> *q=description:(electronics or usb)*. But the first query returns 9662
> documents and the second one 9493. What is the difference?
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/different-result-for-OR-tp4035014.html
> Sent from the Lucene - General mailing list archive at Nabble.com.

Re: different result for 'OR'

Posted by Klaus Ramelow <Kl...@gmx.de>.
nevertheless it`s a Lucene-Bug
(there should be no difference in handling or / OR)

Am 22.01.2013 08:47, schrieb Jeroen Venderbosch:
> Thats it. I could have known it if I  had read the documentation more
> carefully. Replacing the 'or' by 'OR' does the trick.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/different-result-for-OR-tp4035014p4035272.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>


Re: different result for 'OR'

Posted by Jeroen Venderbosch <jv...@woodwing.com>.
Thats it. I could have known it if I  had read the documentation more
carefully. Replacing the 'or' by 'OR' does the trick. 



--
View this message in context: http://lucene.472066.n3.nabble.com/different-result-for-OR-tp4035014p4035272.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Re: different result for 'OR'

Posted by Michael McCandless <lu...@mikemccandless.com>.
That is odd.  Can you print the Query.toString of the actual two
queries you are running?  (I think the OR must be capitalized to be
parsed by the classic QueryParser?).

Mike McCandless

http://blog.mikemccandless.com

On Mon, Jan 21, 2013 at 7:34 AM, Jeroen Venderbosch <jv...@woodwing.com> wrote:
> I would expect that the query *q=description:(electronics) or
> description:(usb)* would give the same number of results as
> *q=description:(electronics or usb)*. But the first query returns 9662
> documents and the second one 9493. What is the difference?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/different-result-for-OR-tp4035014.html
> Sent from the Lucene - General mailing list archive at Nabble.com.