Kevin Liang created SOLR-18447:
----------------------------------
Summary: Normalize and use dot product similarity in place of
cosine similarity for vectors
Key: SOLR-18447
URL: https://issues.apache.org/jira/browse/SOLR-18447
Project: Solr
Issue Type: Improvement
Reporter: Kevin Liang
Dot product similarity of a normalized (unit) vector is mathematically
equivalent to cosine similarity, but dot product product is easier to compute
in terms of computational work (fewer CPU cycles -> reduce query time latency).
Currently it is up to user to identify this optimization and pass normalized
vectors, however we could automatically normalize the vector at ingest time and
use dot product at query time behind the scenes when the field definition is
cosine similarity. Externally, the field should still display as cosine
similarity, return the same results, just be driven internally by normalized
dot product.
There is potentially some discussion as to whether we would want this to be an
opt-in feature or enabled by default w/ possible opt-out.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]