Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 37896 invoked from network); 9 Sep 2009 14:17:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Sep 2009 14:17:55 -0000 Received: (qmail 37489 invoked by uid 500); 9 Sep 2009 14:17:53 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 37413 invoked by uid 500); 9 Sep 2009 14:17:52 -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 37403 invoked by uid 99); 9 Sep 2009 14:17:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:17:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yseeley@gmail.com designates 209.85.219.227 as permitted sender) Received: from [209.85.219.227] (HELO mail-ew0-f227.google.com) (209.85.219.227) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2009 14:17:43 +0000 Received: by ewy27 with SMTP id 27so4655917ewy.40 for ; Wed, 09 Sep 2009 07:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7gM30FrBVMbogxaIvfcd3j52qz1XFn3mjxKNSvKFh4g=; b=GgAANbhu8i95wDKKrVaIJdHLsZFjX6ICUZOiI0kTbWF4Tui9WnXslfSmk0w8QJg2s+ D1+7Vc6YpOi+iU2YEJWfkU9n+gqD2DPpv7jfjncFXXvUC29myss4G36UfVjGicpSdjay jtcszBjqVFlp/SCwUaNGCtUkUvbzgxtIM8Vkg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=DsFMnh5krzK+AC93a7vvigjp5ORw1iRLfjx/iIn7TFA8mORAygzNLXlSQU2/WeqQTl r4ugIgHZSU/qpR3klx0Qtxxr1BPsYcgiyL9x8HC76S1yTc+R4SWZtbk44ciWxhMW/MD2 Xg8fNKlyTocIrPkQlhV8F9kJERilLJlhTeVLE= MIME-Version: 1.0 Sender: yseeley@gmail.com Reply-To: yonik@lucidimagination.com Received: by 10.216.70.82 with SMTP id o60mr62799wed.83.1252505842004; Wed, 09 Sep 2009 07:17:22 -0700 (PDT) In-Reply-To: References: <4A9829C2.2000104@apache.org> Date: Wed, 9 Sep 2009 10:17:21 -0400 X-Google-Sender-Auth: 66cd9c11a1b25981 Message-ID: Subject: Re: Lucene 2.9 RC2 now available for testing From: Yonik Seeley To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Sep 9, 2009 at 9:40 AM, Peter Keegan wrote: > IndexSearcher.search is calling my custom scorer's 'next' and 'doc' metho= ds > 64% fewer times. I see no 'advance' method in any of the hot spots'. I am > getting the same number of hits from the custom scorer. > Has the BooleanScorer2 logic changed? What does your query structure look like? BS2 hasn't changed much. The old BS may be used in certain circumstances, but not in a way that you would see a decrease in skipTo()+next(). Shot in the dark: if your scorer is part of a conjunction, maybe you're getting lucky with an optimization: http://svn.apache.org/viewvc?view=3Drev&revision=3D630698 It was part of http://issues.apache.org/jira/browse/LUCENE-693 , but I had a slight bug to the "highest skip first" optimization that wasn't fixed until 2.4 Let's assume that your custom scorer is dense (matches almost everything) and that another scorer is sparse. If your custom scorer appears first, the conjunction scorer logic would be like so: custom.skipTo(), scorer1.skipTo(), custom.skipTo() =3D> match! If the sparse scorer is first, it will look more like so: scorer1.skipTo(), custom.skipTo() =3D> match! -Yonik http://www.lucidimagination.com > Peter > > On Wed, Sep 9, 2009 at 9:17 AM, Yonik Seeley < > yonik.seeley@lucidimagination.com> wrote: > >> On Wed, Sep 9, 2009 at 8:57 AM, Peter Keegan >> wrote: >> > Using JProfiler, I observe that the improvement >> > is due to a huge reduction in the number of calls to TermDocs.next and >> > TermDocs.skipTo (about 65% fewer calls). >> >> Indexes are searched per-segment now (i.e. MultiTermDocs isn't normally >> used). >> Off the top of my head, I'm not sure how this can lead to fewer >> TermDocs.skipTo() calls though. =A0Are you sure you weren't also >> counting Scorer.skipTo()... which would now be Scorer.advance()? >> Have you verified that your custom scorer is working correctly with >> 2.9 and that you're getting the same number of hits on the overall >> query as you were with previous versions? >> >> -Yonik >> http://www.lucidimagination.com >> >> --------------------------------------------------------------------- >> 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