gf2121 commented on a change in pull request #438: URL: https://github.com/apache/lucene/pull/438#discussion_r761690720
########## File path: lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java ########## @@ -18,23 +18,32 @@ import java.io.IOException; import org.apache.lucene.index.PointValues.IntersectVisitor; +import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.store.DataOutput; import org.apache.lucene.store.IndexInput; +import org.apache.lucene.util.DocBaseBitSetIterator; +import org.apache.lucene.util.FixedBitSet; class DocIdsWriter { private DocIdsWriter() {} - static void writeDocIds(int[] docIds, int start, int count, DataOutput out) throws IOException { + static void writeDocIds( + int[] docIds, int start, int count, DataOutput out, boolean consistentValue) + throws IOException { + if (consistentValue Review comment: @jpountz @iverase Hi! For scenes that index is sorted on the field, blocks with continuous ids can be a common situation. Maybe we can handle this situation more efficiently: We only need to check `stritylysorted && (docIds[start+count-1]-docids[start]+1) = = count` to see if ids are continuous. If continuous, we can just write the first id of this block. I wonder if this optimization will make sense to you? -- 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