You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "gf2121 (via GitHub)" <gi...@apache.org> on 2023/10/27 05:50:34 UTC

Re: [PR] Optimize: Use DocIdSetIterator Reduuce bkd docvalues iteration [lucene]

gf2121 commented on code in PR #12723:
URL: https://github.com/apache/lucene/pull/12723#discussion_r1374099709


##########
lucene/core/src/java/org/apache/lucene/util/DocBaseBitSetIterator.java:
##########
@@ -69,6 +69,9 @@ public int getDocBase() {
 
   @Override
   public int nextDoc() {
+    if (doc == NO_MORE_DOCS) {

Review Comment:
   By [contract](https://github.com/apache/lucene/blob/09da2291c501e25c38a2cb69899b69afb65a22e5/lucene/core/src/java/org/apache/lucene/search/DocIdSetIterator.java#L158) user should not call `DocIdSetIterator#nextDoc` after it has has exhausted.



-- 
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-unsubscribe@lucene.apache.org

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


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