Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 34837 invoked from network); 15 Feb 2011 16:16:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2011 16:16:23 -0000 Received: (qmail 49414 invoked by uid 500); 15 Feb 2011 16:16:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 48912 invoked by uid 500); 15 Feb 2011 16:16:19 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 48897 invoked by uid 99); 15 Feb 2011 16:16:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 16:16:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 16:16:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8081D1A6CD7 for ; Tue, 15 Feb 2011 16:15:57 +0000 (UTC) Date: Tue, 15 Feb 2011 16:15:57 +0000 (UTC) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Message-ID: <1897594290.17830.1297786557522.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1762132408.17822.1297786317954.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (LUCENE-2922) Optimize BlockTermsReader.seek MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-2922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless updated LUCENE-2922: --------------------------------------- Attachment: LUCENE-2922.patch Patch. > Optimize BlockTermsReader.seek > ------------------------------ > > Key: LUCENE-2922 > URL: https://issues.apache.org/jira/browse/LUCENE-2922 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Michael McCandless > Assignee: Michael McCandless > Priority: Minor > Fix For: 4.0 > > Attachments: LUCENE-2922.patch > > > When we seek, we first consult the terms index to find the right block > of 32 (default) terms that may hold the target term. Then, we scan > that block looking for an exact match. > The scanning just uses next() and then compares the full term, but > this is actually rather wasteful. First off, since all terms in the > block share a common prefix, we should compare the target against that > common prefix once, and then only compare the new suffix of each > term. Second, since the term suffixes have already been read up front > into a byte[], we should do a no-copy comparison (vs today, where we > first read a copy into the local BytesRef and then compare). > With this opto, I removed the ability for BlockTermsWriter/Reader to > support arbitrary term sort order -- it's now hardwired to > BytesRef.utf8SortedAsUnicode. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org