jpountz commented on a change in pull request #286:
URL: https://github.com/apache/lucene/pull/286#discussion_r705237964
##########
File path: lucene/core/src/java/org/apache/lucene/search/SortField.java
##########
@@ -606,4 +609,26 @@ public IndexSorter getIndexSorter() {
return null;
}
}
+
+ /**
+ * Disable numeric sort optimization to use the Points index to skip over
non-competitive
+ * documents. By default sorting on a numeric field activates point 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). Another requirement is
that the same data is
+ * indexed with points and doc values for the field.
+ *
+ * <p>This allows to disable sort optimization, in cases where these
requirements can't be met.
+ *
+ * @deprecated should only be used for compatibility with 8.x indices that
got created with
+ * inconsistent data across fields, or the wrong sort configuration in
the index sort
+ */
+ @Deprecated // Remove in Lucene 9
+ public void disablePointSortOptimization() {
+ this.pointSortOptimizationDisabled = true;
+ }
Review comment:
I have a preference for a traditional getter/setter too.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]