mayya-sharipova commented on a change in pull request #2256: URL: https://github.com/apache/lucene-solr/pull/2256#discussion_r568095174
########## File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java ########## @@ -941,6 +969,11 @@ public IndexWriter(Directory d, IndexWriterConfig conf) throws IOException { // obtain the write.lock. If the user configured a timeout, // we wrap with a sleeper and this might take some time. writeLock = d.obtainLock(WRITE_LOCK_NAME); + if (config.getIndexSort() != null && leafSorter != null) { + throw new IllegalArgumentException( + "[IndexWriter] can't use index sort and leaf sorter at the same time!"); Review comment: @msokolov Thank you for your feedback and explanation. Sorry, I am still not super clear about this point. It seems to me as `indexSorter` maps each leaf's documents into the merged segment according to its sort, the same way `leafSorter` will map each leaf's documents into the merged segment according to its sort (given several merging segments, in the merged segment the first docs should be docs from a segment with highest sort values..) But I am ok to remove this check in this PR, as this PR is not concerned with merging, and follow up on this point in the following PR. Addressed in 7ddff6775c8 ---------------------------------------------------------------- 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. 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