jimczi commented on code in PR #12529: URL: https://github.com/apache/lucene/pull/12529#discussion_r1320004511
########## lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java: ########## @@ -60,13 +61,17 @@ public int size() { @Override public byte[] vectorValue(int targetOrd) throws IOException { - readValue(targetOrd); + if (lastOrd != targetOrd) { + readValue(targetOrd); + lastOrd = targetOrd; + } return binaryValue; } private void readValue(int targetOrd) throws IOException { slice.seek((long) targetOrd * byteSize); slice.readBytes(byteBuffer.array(), byteBuffer.arrayOffset(), byteSize); + lastOrd = targetOrd; Review Comment: thanks, addressed in https://github.com/apache/lucene/pull/12529/commits/31d8b549e62a288358c58cd666767d09bf17f65c -- 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