lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: BooleanQuery / multiple indexes - Lucene 3.0.3
Date Thu, 03 Feb 2011 23:17:33 GMT
On Thu, Feb 3, 2011 at 5:57 PM, Phil Herold <pherold@d-wise.com> wrote:
> Hi,
>
>
>
> I'm getting incorrect search results when I use a MultiSearcher across
> multiple indexes with a Boolean query, specifically, foo AND !bar (using
> QueryParser). For example, with two indexes, I have a single document that
> satisfies both "foo" and "bar", so it should be excluded from the search
> result. It's not. If I do the search across the one index (using just
> IndexSearcher) containing the document in question, it excludes the document
> as expected. I've not been able to reproduce this with a simple test case,
> unfortunately. The indexes are large (10K documents), with MB worth of data.
>

Hi, yes this is a bug: https://issues.apache.org/jira/browse/LUCENE-2756

There are fixes to this in unreleased code, but in the meantime you
can use one of these workarounds:
1. queryParser.setMultiTermRewriteMethod(MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE)
2. using IndexSearcher over MultiReader instead of MultiSearcher.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message