iverase commented on code in PR #16847:
URL: https://github.com/apache/lucene/pull/16847#discussion_r4315406058
##########
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:
I think using a LongArrayList should be possible so we can get over this
limitation
--
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]