Skip to content

Commit 8119a8c

Browse files
committed
Fix features
1 parent f50ac6e commit 8119a8c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/41_knn_search_bbq_hnsw_bfloat16.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setup:
22
- requires:
3-
cluster_features: "mapper.bbq_bfloat16"
3+
cluster_features: "mapper.vectors.bbq_hnsw_on_disk_rescoring"
44
reason: 'bfloat16 needs to be supported'
55
- do:
66
indices.create:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.vectors/42_knn_search_bbq_flat_bfloat16.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setup:
22
- requires:
3-
cluster_features: "mapper.bbq_bfloat16"
3+
cluster_features: "mapper.vectors.bbq_hnsw_on_disk_rescoring"
44
reason: 'bfloat16 needs to be supported'
55
- do:
66
indices.create:

server/src/main/java/org/elasticsearch/script/field/vectors/BFloat16RankVectorsDocValuesField.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ public float[] next() {
138138
if (hasNext() == false) {
139139
throw new IllegalArgumentException("No more elements in the iterator");
140140
}
141-
BFloat16.bFloat16ToFloat(vectorValues, buffer);
141+
for (int i = 0; i < buffer.length; i++) {
142+
buffer[i] = BFloat16.bFloat16ToFloat(vectorValues.get());
143+
}
142144
idx++;
143145
return buffer;
144146
}

0 commit comments

Comments
 (0)