ElasticVectorSearch uses the brute force method of searching on vectors.
Recommended to use ElasticsearchStore instead, which gives you the option to uses the approx HNSW algorithm which performs better on large datasets.
ElasticsearchStore also supports metadata filtering, customising the query retriever and much more!
You can read more on ElasticsearchStore: https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
To connect to an Elasticsearch instance that does not require
login credentials, pass the Elasticsearch URL and index name along with the
embedding object to the constructor.
[DEPRECATED] Elasticsearch with k-nearest neighbor search
(k-NN) vector store.
Recommended to use ElasticsearchStore instead, which supports metadata filtering, customising the query retriever and much more!
You can read more on ElasticsearchStore: https://python.langchain.com/docs/integrations/vectorstores/elasticsearch
It creates an Elasticsearch index of text data that can be searched using k-NN search. The text data is transformed into vector embeddings using a provided embedding model, and these embeddings are stored in the Elasticsearch index.