Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 59141 invoked from network); 3 Feb 2011 23:18:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2011 23:18:23 -0000 Received: (qmail 34646 invoked by uid 500); 3 Feb 2011 23:18:21 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 34444 invoked by uid 500); 3 Feb 2011 23:18:20 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 34436 invoked by uid 99); 3 Feb 2011 23:18:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 23:18:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rcmuir@gmail.com designates 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bw0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Feb 2011 23:18:13 +0000 Received: by bwz8 with SMTP id 8so2294774bwz.35 for ; Thu, 03 Feb 2011 15:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=AK8nb1B1Dlk1XjC3q2uffd8ZB+0brMh9TKIYwXilpuM=; b=Gf8UTrJPUk9WqrmOx6nDH0QkW64ydzsfnw/6uC2qfEqDxsPp4IdY38iBz5iuWDv54x Jc6W0MMeKulzTW7o0kzr/WtSi/k/RLgXIcifJKTDG+OuutQyeY0yCDEaHDgNWTbnDbbY MGTe6fHsuuoPtHpIqof5yEfZ2d4joxwxafgo4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=dWSlxkswydS/pq244z4w1OC0ALOqRtXbIXaM8OrsrOcGIqLGH94WbBRzgaaO9DFXPd vpL6hAe6gkPoG/K9vt6TrCJT2wBG4qKP9kUY4m6YcJPFYE0xbWshvo2ioqNfbLGiA/GL CNytZJG3FqCymnpukN/WKGqpsQdcTF13LU5Vs= Received: by 10.204.62.209 with SMTP id y17mr10392011bkh.98.1296775073292; Thu, 03 Feb 2011 15:17:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.101.5 with HTTP; Thu, 3 Feb 2011 15:17:33 -0800 (PST) In-Reply-To: <01d301cbc3f5$b982ec00$2c88c400$@com> References: <01d301cbc3f5$b982ec00$2c88c400$@com> From: Robert Muir Date: Thu, 3 Feb 2011 18:17:33 -0500 Message-ID: Subject: Re: BooleanQuery / multiple indexes - Lucene 3.0.3 To: java-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 3, 2011 at 5:57 PM, Phil Herold 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