[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-dev
Subject: Re: Weird BooleanQuery behavior
From: Paul Elschot <paul.elschot () xs4all ! nl>
Date: 2005-02-08 18:58:36
Message-ID: 200502081958.36303.paul.elschot () xs4all ! nl
[Download RAW message or body]
On Tuesday 08 February 2005 16:07, Cheolgoo Kang wrote:
> Hi all,
>
> I'm getting some weird results using BooleanQuery.
> Let's see an example. Here's a simple OR-connected query.
>
> T:files T:deleting C:thanks C:exists
>
> The query above hits 1 document. But following *same* query only with
> parenthesis results nothing.
>
> (T:files T:deleting) (C:thanks C:exists)
These two queries should give the same result.
Could you provide a test case that reproduces this?
A simple example test case is in the source code of TestNot.java
currently available from here:
http://svn.apache.org/repos/asf/lucene/java/tags/lucene_1_4_3/src/test/org/apache/lucene/search/
You could also add a main() method when you don't want to use JUnit.
>
> Another combinations of MUST and SHOULD.
>
> "T:files T:deleting +C:production +C:optimize" hits 1 document.
> "(T:files T:deleting) (+C:production +C:optimize)" hits 1 document.
>
> Isn't it weird? Is it an expected behavior?
That depends on the index that is being searched.
A correct result could be the same document for both queries.
Regards,
Paul Elschot
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic