[ 
https://issues.apache.org/jira/browse/LUCENE-6021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-6021:
---------------------------------
    Attachment: LUCENE-6021.patch

Here is a patch:
 - oal.util.BitSet has the get/set/clear methods you would expect on a BitSet
 - SparseFixedBitSet and FixedBitSet extend BitSet
 - BitSet also has nextSetBit but the contract of this method has been changed 
to return 2^31-1 instead of -1 when there are no more bits set, it makes it 
possible to reuse this method in DocIdSetIterator.advance/nextDoc
 - BitSet also has default implementations for and(DISI), or(DISI) and 
andNot(DISI) than can be overridden by sub-classes (eg. FixedBitSet does)
 - or/and/andNot have also been added to DocIdSetBuilder
 - BooleanFilter now uses DocIdSetBuilder to build the bitset of matching docs 
instead of enforcing a FixedBitSet (so it will sometimes use a 
SparseFixedBitSet when data is sparse)

> Make FixedBitSet and SparseFixedBitSet share a wider common interface
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-6021
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6021
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 5.0
>
>         Attachments: LUCENE-6021.patch
>
>
> Today, the only common interfaces that these two classes share are Bits and 
> Accountable. I would like to add a BitSet base class that would be both 
> extended by FixedBitSet and SparseFixedBitSet. The idea is to share more code 
> between these two impls and make them interchangeable for more use-cases so 
> that we could just use one or the other based on the density of the data that 
> we are working on.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to