mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
328d0c99f2
This PR adds a constructor `metadata_indexing` parameter to the Cassandra vector store to allow optional fine-tuning of which fields of the metadata are to be indexed. This is a feature supported by the underlying CassIO library. Indexing mode of "all", "none" or deny- and allow-list based choices are available. The rationale is, in some cases it's advisable to programmatically exclude some portions of the metadata from the index if one knows in advance they won't ever be used at search-time. this keeps the index more lightweight and performant and avoids limitations on the length of _indexed_ strings. I added a integration test of the feature. I also added the possibility of running the integration test with Cassandra on an arbitrary IP address (e.g. Dockerized), via `CASSANDRA_CONTACT_POINTS=10.1.1.5,10.1.1.6 poetry run pytest [...]` or similar. While I was at it, I added a line to the `.gitignore` since the mypy _test_ cache was not ignored yet. My X (Twitter) handle: @rsprrs. |
||
---|---|---|
.. | ||
adapters | ||
agent_toolkits | ||
agents | ||
callbacks | ||
chains | ||
chat_loaders | ||
chat_message_histories | ||
chat_models | ||
cross_encoders | ||
docstore | ||
document_compressors | ||
document_loaders | ||
document_transformers | ||
embeddings | ||
example_selectors | ||
graphs | ||
indexes | ||
llms | ||
memory | ||
output_parsers | ||
query_constructors | ||
retrievers | ||
storage | ||
tools | ||
utilities | ||
utils | ||
vectorstores | ||
__init__.py | ||
cache.py | ||
py.typed |