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

Adrien Grand commented on LUCENE-9741:
--------------------------------------

I've fallen into the trap of not optimizing merging for stored fields a couple 
times, typically by forgetting to override {{getMergeInstance()}} when passing 
a FilterCodecReader to {{IndexWriter#addIndexes}}, so I'd be supportive of 
making sequential access more a first-class citizen of stored fields.

However the proposed API feels a bit too complex to me. I wonder if we could 
achieve the same benefits by changing the StoredFieldsReader API to return an 
iterator over stored fields that would keep state in order to avoid 
decompressing the same data over and over again?

> Add optimization for sequential access of stored fields
> -------------------------------------------------------
>
>                 Key: LUCENE-9741
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9741
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>            Reporter: Nhat Nguyen
>            Assignee: Nhat Nguyen
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If we are reading the stored-fields of document ids (25, 27, 28, 26, 99), and 
> doc-25 triggers the stored-fields reader to decompress a block containing 
> document ids [10-50], then we can tell the reader to read not only 25, but 
> 26, 27, and 28 to avoid decompressing that block multiple times.
> This issue proposes adding a new optimized instance of stored-fields reader 
> that allows users to select the preferred fetching range.



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

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

Reply via email to