lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-4932) DirectPostingsFormat can minimize binary searching in seek's
Date Sat, 13 Apr 2013 17:04:16 GMT
David Smiley created LUCENE-4932:
------------------------------------

             Summary: DirectPostingsFormat can minimize binary searching in seek's
                 Key: LUCENE-4932
                 URL: https://issues.apache.org/jira/browse/LUCENE-4932
             Project: Lucene - Core
          Issue Type: Improvement
          Components: core/codecs
            Reporter: David Smiley


I was looking at the DirectPostingsFormat to see exactly what it's doing when you I seekExact().
 It does a plain binary search every time, even if I've positioned the state well into size
of the array.  A comment (probably left by [~mikemccand]) shows that he too knows this could
be done smarter:
{code}
        // TODO: we should use the skip pointers; should be
        // faster than bin search; we should also hold
        // & reuse current state so seeking forwards is
        // faster
{code}

This issue represents resolving that TODO so it's isn't forgotten.

For inspiration about solving this in a smarter way, see Solr's SortedIntDocSet which avoids
binary search using an approach that could be borrowed for this codec.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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


Mime
View raw message