langchain/libs/community/tests/unit_tests/vectorstores
Max Jakob de209af533
community[patch]: ElasticsearchStore: add relevance function selector (#16378)
Implement similarity function selector for ElasticsearchStore. The
scores coming back from Elasticsearch are already similarities (not
distances) and they are already normalized (see
[docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html#dense-vector-params)).
Hence we leave the scores untouched and just forward them.

This fixes #11539.

However, in hybrid mode (when keyword search and vector search are
involved) Elasticsearch currently returns no scores. This PR adds an
error message around this fact. We need to think a bit more to come up
with a solution for this case.

This PR also corrects a small error in the Elasticsearch integration
test.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-01-22 11:52:20 -07:00
..
redis community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_databricks_vector_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_elasticsearch.py community[patch]: ElasticsearchStore: add relevance function selector (#16378) 2024-01-22 11:52:20 -07:00
test_faiss.py community[patch]: add skipped test for inner product normalization (#14989) 2024-01-18 23:03:15 -08:00
test_imports.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_neo4j.py Fix RRF and lucene escape characters for neo4j vector store (#14646) 2023-12-13 09:09:50 -08:00
test_pgvector.py refactor: enable connection pool usage in PGVector (#11514) 2023-12-28 15:07:16 -08:00
test_public_api.py community: Added Lantern as VectorStore (#12951) 2024-01-12 12:00:16 -08:00
test_sklearn.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_utils.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00