[
https://issues.apache.org/jira/browse/SOLR-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650084#action_12650084
]
Michael Busch commented on SOLR-875:
------------------------------------
{quote}
This would however require to change the call to next() into two calls to
next() and doc(). I wonder if this would be a noticeable performance hit?
{quote}
I can also add a
{code}
int nextDoc()
{code}
method to OpenBitSetIterator, that Solr can use. But it would have to set
curDocId before returning the value. So still a tiny overhead, but probably
less than two method calls.
> Consolidate Solr's and Lucene's OpenBitSet classes
> --------------------------------------------------
>
> Key: SOLR-875
> URL: https://issues.apache.org/jira/browse/SOLR-875
> Project: Solr
> Issue Type: Task
> Reporter: Michael Busch
> Priority: Minor
>
> Currently there are two versions of OpenBitSet and BitUtil in Solr and Lucene.
> We should only have one version of these classes in Lucene, that Solr should
> use.
> Tasks here:
> - Merge different versions into Lucene
> - Make Solr classes use/extend the classes in Lucene (we need to keep the
> Solr ones for backwards-compatibility)
> - Deprecate the classes in Solr
> - Change all references in Solr to use the classes in Lucene
> One difficulty here is Solr's BitSetIterator vs. Lucene's OpenBitSetIterator.
> Both have a next() method, however one returns an int (BitSetIterator), the
> other one returns a boolean and offers a doc() method to get the doc id. So I
> can't make BitSetIterator extend OpenBitSetIterator. There are not many
> places in Solr's core that use BitSetIterator, so we could simply change e.g.
> search/BitDocSet.java to use OpenBitSetIterator. This would however require
> to change the call to next() into two calls to next() and doc(). I wonder if
> this would be a noticeable performance hit?
> We could of course also leave both iterators and only merge OpenBitSet and
> BitUtil, but I'd prefer to only have one iterator, because they basically do
> exactly the same.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.