dvisz-inf
(Don Viszneki)
November 20, 2019, 11:59pm
1
Hi all
Presumably ES has some optimized scalar product scoring/sorting for textual relevance similarity scoring using documents' term vectors.
Is this same mechanism available for dense_vector
and sparse_vector
field types?
I'd hate to resort to using a script_score
when ES probably has an optimized implementation!
Thanks!
spinscale
(Alexander Reelsen)
November 21, 2019, 11:50am
2
the dotProduct
and dotProductSparse
functions within the script_score query are indeed what you are looking for I suppose. That's the function made available at the moment. See https://www.elastic.co/guide/en/elasticsearch/reference/7.x/query-dsl-script-score-query.html#_dense_vector_functions
dvisz-inf
(Don Viszneki)
November 21, 2019, 8:55pm
3
Thanks @spinscale .
I suppose then there is no special support for this outside of a script_score
?
In the past I have been disappointed by script_score
performance, but I have not used ES7 yet. Does it get any better with ES7?
Thanks!
spinscale
(Alexander Reelsen)
November 28, 2019, 8:30am
4
Even though there have been improvements, it is hard to tell if they are applied or sufficient for your use-case.
I'd personally just give it a shot and see how it works, if possible.
1 Like
system
(system)
Closed
December 26, 2019, 8:31am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.