The new vector data type and the vector search query API
At this point of the chapter, you should have a good understanding of relevancy ranking in Elasticsearch and how a vector extends the capabilities of search in domains that keyword-based search couldn’t even compete with. We have also covered how vectors are organized into an HNSW graph, stored in memory in Elasticsearch, and the options to evaluate the distance between vectors. Now, we are going to take this knowledge and put it into action by understanding the dense vector data type available in Elasticsearch, setting up our Elastic Cloud environment, and finally, building and running vector search queries.
Sparse and dense vectors
Elasticsearch supports a new data type as part of the mapping called dense_vector
. It is used to store arrays of numeric values. These arrays are vector representation of text semantic. Ultimately, dense vectors are leveraged in the context of vector search and kNN search.
The documentation...