This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 9d7d7b16a3b Add a note that tells cosine similarities are normalized 
(#2092)
9d7d7b16a3b is described below

commit 9d7d7b16a3b8d7de0734d1d5bf9c68f09a3898fd
Author: Hakim <[email protected]>
AuthorDate: Sat Jun 22 16:10:41 2024 +0200

    Add a note that tells cosine similarities are normalized (#2092)
---
 solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc 
b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
index 35f5f094c68..a165015837a 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
@@ -96,6 +96,9 @@ this similarity is intended as an optimized way to perform 
cosine similarity. In
 
 * `cosine`: https://en.wikipedia.org/wiki/Cosine_similarity[Cosine similarity]
 
+[NOTE]
+the cosine similarity scores returned by Solr are normalized like this : `(1 + 
cosine_similarity) / 2`.
+
 [NOTE]
 the preferred way to perform cosine similarity is to normalize all vectors to 
unit length, and instead use DOT_PRODUCT. You should only use this function if 
you need to preserve the original vectors and cannot normalize them in advance.
 

Reply via email to