gf2121 commented on PR #14922:
URL: https://github.com/apache/lucene/pull/14922#issuecomment-3057858468

   > i.e. not actually accounting for upTo bits, but instead just for bitSize
   
   Good point, I checked `BitsetIterator#intoBitset` and we had similar logic 
there.
   
   
https://github.com/apache/lucene/blob/633bb1c68edf7a63885396e5e504c439d92dea92/lucene/core/src/java/org/apache/lucene/util/BitSetIterator.java#L99-L105
   
   But we did not have the check when it comes to the default impl.
   
   
https://github.com/apache/lucene/blob/633bb1c68edf7a63885396e5e504c439d92dea92/lucene/core/src/java/org/apache/lucene/search/DocIdSetIterator.java#L205-L210
   
   To me the contract here is that caller should guarantee there is no doc 
between `offset + bitset.length()` and `upTo` if `offset + bitset.length() < 
upTo`. Maybe we should clarify it in java doc, then there is no difference 
between current impl and check `upTo == NO_MORE_DOCS` only.
   
   It would be great if @jpountz can double check this :)
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to