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

Lu Xugang commented on LUCENE-10120:
------------------------------------

Hi, [~gsmiller]
{quote}I'm not sure we necessarily need to handle the complexity of docs being 
added out-of-order though{quote}
The purpose of considering whether the doc id is unordered(even some docId is 
duplicated) is that I hope *DocIdSetProducer*  is not just only used in 
LRUQueryCache. eg. User can use *DocIdSetProducer* collect docIds in their 
custom *Collector* or when *FixBitSet* was used to collect unordered even 
duplicated docIds then instead of it with *DocIdSetProducer*

{quote}Feel free to incorporate the ideas from my patch file into your PR if 
you think they make sense{quote}
According to the patch you posted, I rewrote *DocIdSetProducer*, so that it 
only handle ordered docs and post a new PR.

I still keep *RangeDocIdSet* so that it can provide random access for 
conjunction like *FixBitSet* in *BitDocIdSet*  see *RangeDocIdSet#bits()*.



> Lazy initialize FixedBitSet in LRUQueryCache
> --------------------------------------------
>
>                 Key: LUCENE-10120
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10120
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: main (10.0)
>            Reporter: Lu Xugang
>            Priority: Major
>         Attachments: 1.png, LUCENE-10120.patch
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Basing on the implement of collecting docIds in DocsWithFieldSet, may be we 
> could do similar way to cache docIdSet in 
> *LRUQueryCache#cacheIntoBitSet(BulkScorer scorer, int maxDoc)* when docIdSet 
> is density.
> In this way , we do not always init a huge FixedBitSet which sometime is not 
> necessary when maxDoc is large
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to