mayya-sharipova commented on a change in pull request #2256:
URL: https://github.com/apache/lucene-solr/pull/2256#discussion_r598855055
##########
File path: lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
##########
@@ -56,7 +57,24 @@
* @throws IOException if there is a low-level IO error
*/
public static DirectoryReader open(final Directory directory) throws
IOException {
- return StandardDirectoryReader.open(directory, null);
+ return StandardDirectoryReader.open(directory, null, null);
+ }
+
+ /**
+ * Returns a IndexReader for the the index in the given Directory
+ *
+ * @param directory the index directory
+ * @param leafSorter a comparator for sorting leaf readers. Providing
leafSorter is useful for
+ * indices on which it is expected to run many queries with particular
sort criteria (e.g. for
+ * time-based indices this is usually a descending sort on timestamp).
In this case {@code
+ * leafSorter} should sort leaves according to this sort criteria.
Providing leafSorter allows
+ * to speed up this particular type of sort queries by early terminating
while iterating
+ * though segments and segments' documents.
Review comment:
Addressed in
https://github.com/apache/lucene/pull/32/commits/f3fbba10d5ff391bc66bbd04032a873c91680493
--
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]