LuXugang commented on code in PR #792:
URL: https://github.com/apache/lucene/pull/792#discussion_r865502567
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsReader.java:
##########
@@ -258,14 +257,20 @@ public TopDocs search(String field, float[] target, int
k, Bits acceptDocs, int
}
private OffHeapVectorValues getOffHeapVectorValues(FieldEntry fieldEntry)
throws IOException {
+ if (fieldEntry.docsWithFieldOffset == -2) {
Review Comment:
> We could move this method to the OffHeapVectorValues class as a static
constructor. It would be like static OffHeapVectorValues load(FieldEntry
fieldEntry, IndexInput vectorData) { ... }.
addressed in
https://github.com/apache/lucene/pull/792/commits/02b6921fbd95196ece98943fcf06e896f1d03926
.
> We could move the getAcceptOrds method to OffHeapVectorValues. This lets
us remove the check if (vectorValues instanceOf DenseOffHeapVectorValues) { ..
}.
addressed in
https://github.com/apache/lucene/pull/792/commits/1f1be708c58337f4bb1542dc79a9bef1f189de15
.
> We can move OffHeapVectorValues to its own class now that it has grown. It
would still be package-private.
addressed in
https://github.com/apache/lucene/pull/792/commits/771a9e53a0e05fd32ccfcd505149ab9b73686df7
.
--
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]