You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "gsmiller (via GitHub)" <gi...@apache.org> on 2023/03/09 23:58:46 UTC

[GitHub] [lucene] gsmiller commented on a diff in pull request #12194: [GITHUB-11915] [Discussion Only] Make Lucene smarter about long runs of matches via new API on DISI

gsmiller commented on code in PR #12194:
URL: https://github.com/apache/lucene/pull/12194#discussion_r1131775078


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PostingsReader.java:
##########
@@ -479,6 +481,31 @@ private void refillDocs() throws IOException {
       assert docBuffer[BLOCK_SIZE] == NO_MORE_DOCS;
     }
 
+    @Override
+    public int peekNextNonMatchingDocID() throws IOException {

Review Comment:
   This won't be straight forward, but we have a "special" encoding whenever a block is "completely dense" (i.e., has a run of 128 consecutive docs). See `PForUtil#decodeAndPrefixSum` for details. I wonder if we can leverage that here? In extreme cases, we may have multiple blocks that are all consecutive. Could we "peek ahead" and discover that?



-- 
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