iprithv commented on code in PR #16068:
URL: https://github.com/apache/lucene/pull/16068#discussion_r3312498476


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/codecs/faiss/FaissKnnVectorsWriter.java:
##########
@@ -197,6 +209,53 @@ public long ramBytesUsed() {
     return rawVectorsWriter.ramBytesUsed();
   }
 
+  private static class ByteToFloatVectorValues extends FloatVectorValues {
+    private final ByteVectorValues bytes;
+    private final DocIdSet docIdSet;
+
+    public ByteToFloatVectorValues(ByteVectorValues bytes) {
+      this(bytes, null);
+    }
+
+    public ByteToFloatVectorValues(ByteVectorValues bytes, DocIdSet docIdSet) {
+      this.bytes = bytes;
+      this.docIdSet = docIdSet;
+    }
+
+    @Override
+    public float[] vectorValue(int ord) throws IOException {
+      byte[] b = bytes.vectorValue(ord);
+      float[] f = new float[b.length];

Review Comment:
   sure, done. thanks!



-- 
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]

Reply via email to