On Thu, Feb 3, 2011 at 5:57 PM, Phil Herold <pher...@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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org