We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d99668 commit a737c34Copy full SHA for a737c34
server/src/main/java/org/elasticsearch/script/VectorScoreScriptUtils.java
@@ -83,6 +83,7 @@ public ByteDenseVectorFunction(
83
for (float val : floatQueryVector) {
84
queryMagnitude += val * val;
85
}
86
+ queryMagnitude = Math.sqrt(queryMagnitude);
87
for (int i = 0; i < floatQueryVector.length; i++) {
88
floatQueryVector[i] /= (float) queryMagnitude;
89
0 commit comments