mayya-sharipova commented on a change in pull request #2256:
URL: https://github.com/apache/lucene-solr/pull/2256#discussion_r598857854



##########
File path: lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java
##########
@@ -478,6 +479,18 @@ public IndexWriterConfig setIndexSort(Sort sort) {
     return this;
   }
 
+  /**
+   * Set the comparator for sorting leaf readers. A DirectoryReader opened 
from a IndexWriter with
+   * this configuration will have its leaf readers sorted with the provided 
leaf sorter.
+   *
+   * @param leafSorter – a comparator for sorting leaf readers
+   * @return IndexWriterConfig with leafSorter set.
+   */
+  public IndexWriterConfig setLeafSorter(Comparator<LeafReader> leafSorter) {

Review comment:
       How will leafSorter sort leaves in this case? By what criteria?  If a 
sorting criteria is anything different than the existing order of leaves,  this 
will break some of our tests that rely on specific docIds. For example tests in 
the class `TestBasics` that check for specific docIDs.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to