mikemccand commented on code in PR #12653:
URL: https://github.com/apache/lucene/pull/12653#discussion_r1364203049


##########
lucene/core/src/java/org/apache/lucene/codecs/MultiLevelSkipListWriter.java:
##########
@@ -63,6 +63,9 @@ public abstract class MultiLevelSkipListWriter {
   /** for every skip level a different buffer is used */
   private ByteBuffersDataOutput[] skipBuffer;
 
+  /** Length of the window at which the skips are placed on skip level 1 */
+  private final long windowLength;

Review Comment:
   I think it's fine to use `int` here, and then use `Math.toIntExact` to cast 
the (long) multiplied value back down to int.  A single postings list is at 
most `Integer.MAX_VALUE` (actually a bit less than this) documents since a 
single Lucene index can hold at most that many documents, and all docids in a 
postings list are unique.



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