[ 
https://issues.apache.org/jira/browse/LUCENE-5440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13900170#comment-13900170
 ] 

Shai Erera commented on LUCENE-5440:
------------------------------------

I reviewed how we can perhaps not break the API. I thought first to
deprecate BitDocSet and create a new class BitsDocSet which will use
FixedBitSet. But the problem is that DocSet (the interface) commits to
OpenBitSet in its APIs: .getBits() and .setBitsOn().

I think that .setBitsOn could take a DocSet and check if it's a BitsDocSet,
call bits.or(), otherwise, iterate on the bits and call add().

As for .getBits(), it's currently used by DocSetBase's various base impls,
so I think if we made it protected (and only on DocSetBase), we could get
rid of it from the public API. BitDocSet would then override to return a
bits.clone(), whereas the others would just create a new FBS, like what
DocSetBase.getBits() does now.

It's also used by UninvertField, but it assumes the given DocSet is
BitDocSet already, so we can just add .getBits() to BitDocSet...

While this breaks the DocSet API, I think it's a good break as it allows
flexibility in the future (e.g if we rename FixedBitSet to IntBitSet, the
API doesn't break again). I'll post a patch soon.






> Add LongFixedBitSet and replace usage of OpenBitSet
> ---------------------------------------------------
>
>                 Key: LUCENE-5440
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5440
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>         Attachments: LUCENE-5440-solr.patch, LUCENE-5440-solr.patch, 
> LUCENE-5440.patch, LUCENE-5440.patch, LUCENE-5440.patch, LUCENE-5440.patch, 
> LUCENE-5440.patch
>
>
> Spinoff from here: http://lucene.markmail.org/thread/35gw3amo53dsqsqj. I 
> wrote a LongFixedBitSet which behaves like FixedBitSet, only allows managing 
> more than 2.1B bits. It overcome some issues I've encountered with 
> OpenBitSet, such as the use of set/fastSet as well the implementation of 
> DocIdSet. I'll post a patch shortly and describe it in more detail.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to