You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Pulkitg64 (via GitHub)" <gi...@apache.org> on 2026/06/01 18:36:32 UTC

Re: [PR] Add half-float (FP16) storage support for vectors [lucene]

Pulkitg64 commented on code in PR #15549:
URL: https://github.com/apache/lucene/pull/15549#discussion_r3336358782


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsWriter.java:
##########
@@ -328,7 +356,8 @@ public void finish() throws IOException {
 
   @Override
   public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws IOException {
-    if (!fieldInfo.getVectorEncoding().equals(VectorEncoding.FLOAT32)) {
+    VectorEncoding vectorEncoding = fieldInfo.getVectorEncoding();
+    if (vectorEncoding != VectorEncoding.FLOAT32 && vectorEncoding != VectorEncoding.FLOAT16) {

Review Comment:
   Added in next revision, thanks for the suggestion.



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org