Pulkitg64 commented on code in PR #15549:
URL: https://github.com/apache/lucene/pull/15549#discussion_r3554288616
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsReader.java:
##########
@@ -280,12 +305,67 @@ public ByteVectorValues getByteVectorValues(String field)
throws IOException {
return rawVectorsReader.getByteVectorValues(field);
}
+ @Override
+ public Float16VectorValues getFloat16VectorValues(String field) throws
IOException {
+ FieldEntry fi = fields.get(field);
+ if (fi == null) {
+ return null;
+ }
+ if (fi.vectorEncoding != VectorEncoding.FLOAT16) {
+ throw new IllegalArgumentException(
+ "field=\""
+ + field
+ + "\" is encoded as: "
+ + fi.vectorEncoding
+ + " expected: "
+ + VectorEncoding.FLOAT16);
+ }
+
+ Float16VectorValues rawFloatVectorValues =
rawVectorsReader.getFloat16VectorValues(field);
+
+ if (rawFloatVectorValues.size() == 0) {
Review Comment:
Thanks @msokolov
I agree the quantization part of this PR is making things complicated and
its better to split the PR where I will first add support for fp16 storage and
then another PR for adding quantization support.
--
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]