jimczi commented on code in PR #16847:
URL: https://github.com/apache/lucene/pull/16847#discussion_r4322284303
##########
lucene/core/src/java/org/apache/lucene/document/LatLonPoint.java:
##########
@@ -424,7 +424,9 @@ public static TopFieldDocs nearest(
if (points != null) {
totalHits += points.getDocCount();
readers.add(points);
- docBases.add(leaf.docBase);
+ // NearestNeighbor addresses the composite doc space with int;
point-nearest does not
+ // support a reader with more than Integer.MAX_VALUE docs.
+ docBases.add(Math.toIntExact(leaf.docBase));
Review Comment:
Done. Switched to `LongArrayList` and widened the composite doc id through
`NearestNeighbor`, so point nearest-neighbor search works past 2^31 now. Pushed.
--
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]