shubhamvishu commented on code in PR #13328: URL: https://github.com/apache/lucene/pull/13328#discussion_r1623688659
########## lucene/core/src/java/org/apache/lucene/document/NearestNeighbor.java: ########## @@ -34,20 +34,16 @@ /** KNN search on top of 2D lat/lon indexed points. */ class NearestNeighbor { - static class Cell implements Comparable<Cell> { - final int readerIndex; - final byte[] minPacked; - final byte[] maxPacked; - final PointTree index; - - /** - * The closest distance from a point in this cell to the query point, computed as a sort key - * through {@link SloppyMath#haversinSortKey}. Note that this is an approximation to the closest - * distance, and there could be a point in the cell that is closer. - */ - final double distanceSortKey; - - public Cell( + /** + * @param distanceSortKey The closest distance from a point in this cell to the query point, + * computed as a sort key through {@link SloppyMath#haversinSortKey}. Note that this is an + * approximation to the closest distance, and there could be a point in the cell that is + * closer. + */ + record Cell( + PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSortKey) + implements Comparable<Cell> { + Cell( Review Comment: done -- 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