abernardi597 commented on issue #16392:
URL: https://github.com/apache/lucene/issues/16392#issuecomment-5095222838

   While I'd also prefer to use a visitor if possible, I think that only works 
when the discreet byte ranges are fully known. For example, vector formats 
statically know the offset & length into the `IndexInput` for a given field.
   
   But some formats only have efficient access to either start or end offsets. 
One idea is to gather all these offsets, sort them, and then use the next or 
previous offset (respectively) to determine the range. Sorting the extents 
requires a materialization of them all, so a visitor wouldn't save anything 
here: worst case it doubles the object allocations required.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to