zhaih commented on a change in pull request #630: URL: https://github.com/apache/lucene/pull/630#discussion_r799744915
########## File path: lucene/misc/src/java/org/apache/lucene/misc/index/IndexRearranger.java ########## @@ -84,6 +112,28 @@ public void execute() throws Exception { } executor.shutdown(); } + if (determinedOrder == false) { + return; + } + List<SegmentCommitInfo> ordered = new ArrayList<>(); + try (IndexReader reader = DirectoryReader.open(output)) { + for (DocumentSelector ds : documentSelectors) { + boolean found = false; + for (LeafReaderContext context : reader.leaves()) { + SegmentReader sr = (SegmentReader) context.reader(); + if (ds.getFilteredLiveDocs(sr).nextSetBit(0) != DocIdSetIterator.NO_MORE_DOCS) { + assert found == false; Review comment: Makes sense, changed! -- 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