[
https://issues.apache.org/jira/browse/SOLR-17164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris M. Hostetter reassigned SOLR-17164:
-----------------------------------------
Assignee: Chris M. Hostetter
> Add 2 arg variant of vectorSimilarity() function
> ------------------------------------------------
>
> Key: SOLR-17164
> URL: https://issues.apache.org/jira/browse/SOLR-17164
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Labels: vector-based-search
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Solr's current 4 argument
> {{vectorySimilarity(vectorEncoding,similarityFunction,vec1,vec2)}} function
> is really awkward to use for the (seemingly common) situation where you just
> want to know the similarity between a field and a constant vector, or
> (probably less common) between two fields of the same type.
> The first two (currently) mandatory arguments to {{vectorySimilarity()}}
> ({{{}vectorEncoding{}}} and {{{}similarityFunction{}}}) are already mandatory
> properties of {{{}DenseVectorField{}}}. IIUC the only reason these arguments
> are required is in the (seemingly uncommon?) situation where you might want
> to compute the similarity of two vector constants, so the function needs to
> know what {{vectorEncoding}} and {{similarityFunction}} to use.
>
> ----
>
> It would be really nice to support a simplified 2 argument variant of
> {{vectorySimilarity()}} such that:
> * the first argument must be the name of a {{DenseVectorField}} field
> * the second argument must be either:
> ** A vector constant
> *** in which case the {{vectorEncoding}} use to parse the constant is
> infered from the fieldType properties of the first argument
> ** Or the name of a second {{DenseVectorField}} field
> *** in which case the {{vectorEncoding}} and {{similarityFunction}} of the
> two fields must match
> * The ValueSource returned should be based on the configured
> {{vectorEncoding}} & {{similarityFunction}} of the field(s)
> Examples...
> {noformat}
> vectorySimilarity(title_float_vec_dim4, [1.0,2.0,3.0,4.0])
> ...or...
> vectorySimilarity(title_float_vec_dim4, body_float_vec_dim4)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]