alessandrobenedetti commented on code in PR #926: URL: https://github.com/apache/lucene/pull/926#discussion_r885636403
########## lucene/core/src/java/org/apache/lucene/util/hnsw/NeighborQueue.java: ########## @@ -109,12 +117,15 @@ public int[] nodes() { /** Returns the top element's node id. */ public int topNode() { - return (int) order.apply(heap.top()); + return decodeNodeId(heap.top()); } - /** Returns the top element's node score. */ - public float topScore() { - return NumericUtils.sortableIntToFloat((int) (order.apply(heap.top()) >> 32)); + /** + * Returns the top element's node score. For the min heap this is the minimum score. For the max Review Comment: Ok then! Just reverted! Closing this -- 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