Apply query score conversion to vector similarities in SimpleTextKnnVectorReader

This commit is contained in:
Michael Sokolov 2021-10-30 21:26:17 -04:00
parent c2c215d3a8
commit 84a4797d14
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ public class SimpleTextKnnVectorsReader extends KnnVectorsReader {
continue;
}
float[] vector = values.vectorValue();
float score = vectorSimilarity.compare(vector, target);
float score = vectorSimilarity.convertToScore(vectorSimilarity.compare(vector, target));
if (vectorSimilarity.reversed) {
score = 1 / (score + 1);
}