Is there any way we can use list of vectors to store in ElasticSearch and what are the corresponding changes required in ES query for calculating cosine similarity

Provided I am able to create single dense vector field and calculate cosine similarity using the ElasticSearch query mentioned in official documentation. Still not getting how to create list of dense vectors and apply cosine similarity. Please let me know what I am thinking is even possible as of now to implement in ElasticSearch or not?

as the vectors are put of the document, the vectors need to be created when that document is stored - this also means that you have to create those vectors yourself - that could be by running a job to create vectors/a data model before you index your data, but there cannot be done within Elasticsearch.

You may also have seen the machine learning integration with transforms. See Feature importance for data frame analytics with Elastic machine learning | Elastic Blog or Overview | Machine Learning in the Elastic Stack [7.13] | Elastic

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.