You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/08/24 17:17:00 UTC

[GitHub] [lucene] mayya-sharipova commented on a diff in pull request #3125: LUCENE-10633 Disable sort optimization for SortedSetSortField

mayya-sharipova commented on code in PR #3125:
URL: https://github.com/apache/lucene/pull/3125#discussion_r954070675


##########
lucene/core/src/java/org/apache/lucene/search/SortField.java:
##########
@@ -627,31 +634,35 @@ public IndexSorter getIndexSorter() {
   }
 
   /**
-   * Enables/disables numeric sort optimization to use the Points index.
+   * Enables/disables numeric sort optimization to use the indexed data.
    *
    * <p>Enabled by default. By default, sorting on a numeric field activates point sort optimization
    * that can efficiently skip over 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.
    *
-   * @param optimizeSortWithPoints providing {@code false} disables the optimization, in cases where
-   *     these requirements can't be met.
+   * <p>By default, sorting on a SORTED(_SET) field activates sort optimization that can efficiently
+   * skip over non-competitive hits. Sort optimization requires that the same data is indexed with
+   * term index and doc values for the field.
+   *
+   * @param optimizeSortWithIndexedData providing {@code false} disables the 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 10
-  public void setOptimizeSortWithPoints(boolean optimizeSortWithPoints) {
-    this.optimizeSortWithPoints = optimizeSortWithPoints;
+  public void setOptimizeSortWithIndexedData(boolean optimizeSortWithIndexedData) {
+    this.optimizeSortWithIndexedData = optimizeSortWithIndexedData;

Review Comment:
   I thought the same, but found it `withPoints` part quite misleading. How about having both `setOptimizeSortWithPoints` and `setOptimizeSortWithIndexedData`, where `setOptimizeSortWithPoints` will call `setOptimizeSortWithIndexedData`?



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org