mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-20 14:31:44 +00:00
# Create elastic_vector_search.ElasticKnnSearch class This extends `langchain/vectorstores/elastic_vector_search.py` by adding a new class `ElasticKnnSearch` Features: - Allow creating an index with the `dense_vector` mapping compataible with kNN search - Store embeddings in index for use with kNN search (correct mapping creates HNSW data structure) - Perform approximate kNN search - Perform hybrid BM25 (`query{}`) + kNN (`knn{}`) search - perform knn search by either providing a `query_vector` or passing a hosted `model_id` to use query_vector_builder to automatically generate a query_vector at search time Connection options - Using `cloud_id` from Elastic Cloud - Passing elasticsearch client object search options - query - k - query_vector - model_id - size - source - knn_boost (hybrid search) - query_boost (hybrid search) - fields This also adds examples to `docs/modules/indexes/vectorstores/examples/elasticsearch.ipynb` Fixes # [5346](https://github.com/hwchase17/langchain/issues/5346) cc: @dev2049 --> --------- Co-authored-by: Dev 2049 <dev.dev2049@gmail.com> |
||
---|---|---|
.. | ||
analyticdb.ipynb | ||
annoy.ipynb | ||
atlas.ipynb | ||
chroma.ipynb | ||
deeplake.ipynb | ||
docarray_hnsw.ipynb | ||
docarray_in_memory.ipynb | ||
elasticsearch.ipynb | ||
faiss.ipynb | ||
lancedb.ipynb | ||
matchingengine.ipynb | ||
milvus.ipynb | ||
mongodb_atlas_vector_search.ipynb | ||
myscale.ipynb | ||
opensearch.ipynb | ||
pgvector.ipynb | ||
pinecone.ipynb | ||
qdrant.ipynb | ||
redis.ipynb | ||
sklearn.ipynb | ||
supabase.ipynb | ||
tair.ipynb | ||
typesense.ipynb | ||
vectara.ipynb | ||
weaviate.ipynb | ||
zilliz.ipynb |