Closed Hronom closed 3 years ago
Here we have Elasticsearch Score for cosinesimil in Approximate k-NN https://opendistro.github.io/for-elasticsearch-docs/docs/knn/approximate-knn/#spaces
The wrong is score = 1 / (1 + Distance Function) and lower score equates to a closer and better result. This means negative cosinesimil will push doc's on top.
score = 1 / (1 + Distance Function)
lower score equates to a closer and better result
However here https://opendistro.github.io/for-elasticsearch-docs/docs/knn/knn-score-script/#spaces the Elasticsearch Score is correct 1 + Distance Function
1 + Distance Function
Error is on our side, all good with Elasticsearch, closing
Here we have Elasticsearch Score for cosinesimil in Approximate k-NN https://opendistro.github.io/for-elasticsearch-docs/docs/knn/approximate-knn/#spaces
The wrong is
score = 1 / (1 + Distance Function)
andlower score equates to a closer and better result
. This means negative cosinesimil will push doc's on top.However here https://opendistro.github.io/for-elasticsearch-docs/docs/knn/knn-score-script/#spaces the Elasticsearch Score is correct
1 + Distance Function