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



##########
File path: 
lucene/core/src/test/org/apache/lucene/search/TestFieldSortOptimizationSkipping.java
##########
@@ -290,5 +299,114 @@ public void testFloatSortOptimization() throws 
IOException {
     dir.close();
   }
 
+  public void testDocSortOptimizationWithAfter() throws IOException {
+    final Directory dir = newDirectory();
+    final IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig());
+    final int numDocs = atLeast(1500);
+    for (int i = 0; i < numDocs; ++i) {
+      final Document doc = new Document();
+      writer.addDocument(doc);
+      if ((i > 0) && (i % 500 == 0)) {
+        writer.commit();
+      }
+    }
+    final IndexReader reader = DirectoryReader.open(writer);
+    IndexSearcher searcher = new IndexSearcher(reader);
+    final int numHits = 3;
+    final int totalHitsThreshold = 3;
+    final int searchAfter = 1400;
+
+    // sort by _doc with search after should trigger optimization

Review comment:
       Addressed in 493d9eb




----------------------------------------------------------------
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

Reply via email to