Allow float[]
with byte[]
comparisons for cosine
and dotProduct
for dense_vector scripting
#117274
Labels
>enhancement
:Search Relevance/Vectors
Vector search
Team:Search Relevance
Meta label for the Search Relevance team in Elasticsearch
Description
Right now, for vectors stored as
element_type: byte
we disallow scripting functions to be calculated with floating point query. However, if the user used some external quantization methodology, allowing the asymmetric distance calculation like this might be useful.Since we already calculate magnitude for everything, the implementation will be fairly trivial.
The one aspect around this that might be "slow" is the actual vector ops. We have no SIMD optimized operations between
float[], byte[]
for dot-product. But, that should be fairly simple to do.The text was updated successfully, but these errors were encountered: