[
https://issues.apache.org/jira/browse/LUCENE-5441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902865#comment-13902865
]
ASF GitHub Bot commented on LUCENE-5441:
----------------------------------------
GitHub user PaulElschot opened a pull request:
https://github.com/apache/lucene-solr/pull/33
LUCENE-5092, 2nd try
In core introduce DocBlocksIterator.
Use this in FixedBitSet, in EliasFanoDocIdSet and in join module ToChild...
and ToParent...
Also change BaseDocIdSetTestCase to test
DocBlocksIterator.advanceToJustBefore.
This was simplified a lot by LUCENE-5441 and LUCENE-5440.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/lucene-solr LUCENE-5092-pull-2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/33.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #33
----
commit 4f8eae48ff0441b86a0fdb130e564f646dffcc43
Author: Paul Elschot <[email protected]>
Date: 2014-02-16T22:31:58Z
Squashed commit for LUCENE-5092
----
> Decouple DocIdSet from OpenBitSet and FixedBitSet
> -------------------------------------------------
>
> Key: LUCENE-5441
> URL: https://issues.apache.org/jira/browse/LUCENE-5441
> Project: Lucene - Core
> Issue Type: Task
> Components: core/other
> Affects Versions: 4.6.1
> Reporter: Uwe Schindler
> Fix For: 5.0
>
> Attachments: LUCENE-5441.patch, LUCENE-5441.patch, LUCENE-5441.patch
>
>
> Back from the times of Lucene 2.4 when DocIdSet was introduced, we somehow
> kept the stupid "filters can return a BitSet directly" in the code. So lots
> of Filters return just FixedBitSet, because this is the superclass (ideally
> interface) of FixedBitSet.
> We should decouple that and *not* implement that abstract interface directly
> by FixedBitSet. This leads to bugs e.g. in BlockJoin, because it used Filters
> in a wrong way, just because it was always returning Bitsets. But some
> filters actually don't do this.
> I propose to let FixedBitSet (only in trunk, because that a major backwards
> break) just have a method {{asDocIdSet()}}, that returns an anonymous
> instance of DocIdSet: bits() returns the FixedBitSet itsself, iterator()
> returns a new Iterator (like it always did) and the cost/cacheable methods
> return static values.
> Filters in trunk would need to be changed like that:
> {code:java}
> FixedBitSet bits = ....
> ...
> return bits;
> {code}
> gets:
> {code:java}
> FixedBitSet bits = ....
> ...
> return bits.asDocIdSet();
> {code}
> As this methods returns an anonymous DocIdSet, calling code can no longer
> rely or check if the implementation behind is a FixedBitSet.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]