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

Shai Erera updated LUCENE-5440:
-------------------------------

    Attachment: LUCENE-5440.patch

bq. Maybe if we added a FixedBitSet.ensureCapacity

You're right. Added FixedBitSet.ensureCapacity.

bq. I find it crazy that SloppyPhraseScorer seems to allocate a new bitset
for every .advance call?

Me too, therefore I only added a TODO. I guess a quick fix would be to try and 
share a single FixedBitSet and clear() it in each advance. Also I'd optimize 
the scary {{while (bits.cardinality() > 0)}}. Maybe in a separate issue?

bq. Maybe we should rename FBS -> IntFBS?

We could, though it will generate a huge amount of changes, so if we want to do 
it, I'll do it after we're done reviewing the patch (just rote rename). But 
since it's public and useful API (i.e. even though it's marked internal, I 
believe it's used wider than just Lucene), maybe we shouldn't? It's just a 
rename...

BTW, I reviewed more Solr code and could use some guidance from someone who's 
more familiar with it. Looks like a core class of Solr that uses OBS is 
BitDocSet, but from what I can tell, it doesn't rely much on elasticity (e.g. 
it documents that the given bitset should be at least of size maxDoc()). Also, 
it (and other classes) sometimes use set/get and sometimes fast. So if someone 
can confirm it's safe to change this class to use FixedBitSet (seems like we 
don't even need Long here), I'll do it.

> 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.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