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



##########
File path: 
lucene/core/src/java/org/apache/lucene/search/SortedNumericSortField.java
##########
@@ -242,12 +241,21 @@ public void setMissingValue(Object missingValue) {
   }
 
   @Override
-  public FieldComparator<?> getComparator(int numHits, int sortPos) {
+  public FieldComparator<?> getComparator(int numHits, boolean enableSkipping) 
{
     final FieldComparator<?> fieldComparator;
+    // we can use sort optimization with points if selector is MIN or MAX,

Review comment:
       Nice! I like how code got simplified in this class.

##########
File path: 
lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java
##########
@@ -153,26 +152,6 @@ protected NumericDocValues 
getNumericDocValues(LeafReaderContext context, String
       return DocValues.getNumeric(context.reader(), field);
     }
 
-    /**
-     * Retrieves point values for the field in this segment
-     *
-     * <p>If you override this method, you must also override {@link
-     * #getNumericDocValues(LeafReaderContext, String)} This class uses sort 
optimization that
-     * leverages points to filter out non-competitive matches, which relies on 
the assumption that
-     * points and doc values record the same information. Return {@code null} 
even if no points
-     * implementation is available, in this case sort optimization with points 
will be disabled.
-     *
-     * @param context – reader context
-     * @param field - field name
-     * @return point values for the field in this segment if they are 
available or {@code null} if
-     *     sort optimization with points should be disabled.
-     * @throws IOException If there is a low-level I/O error
-     */
-    protected PointValues getPointValues(LeafReaderContext context, String 
field)

Review comment:
       I can't think of any case where we have a custom representation of 
docValues and also provide a custom representation of pointValues. So this 
change is LGTM!




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