jpountz commented on a change in pull request #91:
URL: https://github.com/apache/lucene/pull/91#discussion_r629881471



##########
File path: 
lucene/core/src/java/org/apache/lucene/util/bkd/MutablePointsReaderUtils.java
##########
@@ -35,63 +37,60 @@
 
   MutablePointsReaderUtils() {}
 
-  /** Sort the given {@link MutablePointValues} based on its packed value then 
doc ID. */
+  /**
+   * Sort the given {@link MutablePointValues} based on its packed value, note 
that doc ID is not
+   * taken into sorting algorithm, since if they are already in ascending 
order, stable sort is able
+   * to maintain the ordering of doc ID.
+   */

Review comment:
       You should be able to use `sortMap#oldToNew` on doc IDs to know what 
their index should be if sorted by increasing doc ID (before the wrapping 
happens, ie. right before [this 
line](https://github.com/apache/lucene/blob/d03662c48bfc5bf2be4840a7f743f9cb64b17fee/lucene/core/src/java/org/apache/lucene/index/PointValuesWriter.java#L181)).




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