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



##########
File path: lucene/core/src/java/org/apache/lucene/search/SortField.java
##########
@@ -606,4 +609,20 @@ public IndexSorter getIndexSorter() {
         return null;
     }
   }
+
+  /**
+   * Disable numeric sort optimization. By default sorting on a numeric field 
activates sort
+   * optimization that can efficiently skip non-competitive hits. Sort 
optimization has a number of
+   * requirements, one of which is that SortField.Type matches the Point type 
with which the field
+   * was indexed (e.g. sort on IntPoint field should use SortField.Type.INT).
+   *
+   * <p>This allows to disable sort optimization, in cases where these 
requirements can't be met.
+   */
+  public void disableSortOptimization() {
+    this.sortOptimizationDisabled = true;
+  }
+
+  protected boolean sortOptimizationDisabled() {
+    return sortOptimizationDisabled;
+  }

Review comment:
       Addressed in 9fe721c02ecefd5cee261da4c64b4b785a044f88




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

Reply via email to