Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 3646 invoked from network); 14 Oct 2009 09:30:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Oct 2009 09:30:11 -0000 Received: (qmail 30591 invoked by uid 500); 14 Oct 2009 09:30:09 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 30507 invoked by uid 500); 14 Oct 2009 09:30:08 -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 30495 invoked by uid 99); 14 Oct 2009 09:30:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 09:30:08 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.211.184] (HELO mail-yw0-f184.google.com) (209.85.211.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 09:30:00 +0000 Received: by ywh14 with SMTP id 14so2060939ywh.20 for ; Wed, 14 Oct 2009 02:29:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.76.3 with SMTP id y3mr14515416yba.48.1255512579232; Wed, 14 Oct 2009 02:29:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Oct 2009 05:29:39 -0400 Message-ID: <9ac0c6aa0910140229o495fe9cbp460934fc3e960ffb@mail.gmail.com> Subject: Re: PhraseQuery in BooleanQuery not working properly in 2.9.0 From: Michael McCandless To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org It sounds likely that this is https://issues.apache.org/jira/browse/LUCENE-1974 Is it possible for you to test that patch and verify it resolves your problem? Mike On Tue, Oct 13, 2009 at 9:23 AM, Ion Barcan wrote: > Hello, > > With the new Lucene 2.9.0 (on a newly built index of approx. 30 > million documents) running BooleanQueries containing PhraseQuery does > not work properly. I've verified this on both optimized and > unoptimized index versions. > > For example: > > lucli> count field1:"john doe" > Searching for: field1:"john doe" > 496 total documents > > lucli> count +(field1:"john doe") > Searching for: +field1:"john doe" > 496 total documents > > lucli> count +(field1:"john doe" field1:"john doe") > Searching for: +(field1:"john doe" field1:"john doe") > 5 total documents > > lucli> count +(+field1:"john doe" field1:"john doe") > Searching for: +(+field1:"john doe" field1:"john doe") > 496 total documents > > lucli> count +(field1:"john doe" field2:UnmatchedValue) > Searching for: +(field1:"john doe" field2:UnmatchedValue) > 5 total documents > > lucli> count +(+field1:"john doe" field2:UnmatchedValue) > Searching for: +(+field1:"john doe" field2:UnmatchedValue) > 496 total documents > > This was also verifiable when I searched using TopScoreDocCollector(N, > true|false), with the call using docsScoredInOrder=false producing > incorrect results. > > While debugging I've noticed that for the BooleanQuery containing at > least one MUST clause BooleanScorer2 is used and this produces the > correct number of results, while for BooleanQuery that don't contain > any MUST clause BooleanScorer.score(Collector, int, int) selects up to > a certain number of docs and then it exits prematurely. > > Is this behaviour normal? This used to work in Lucene 2.4.x. > > I've noticed another user mentioning a similar behaviour > (http://mail-archives.apache.org/mod_mbox/lucene-java-user/200910.mbox/%3C20091008121147.107a8589@pc-4176.kl.dfki.de%3E), > but in my case it's a newly built index, not one that was migrated > from 2.4 to 2.9. > > Thanks, > Ionut > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org