Allow multiple metadata keys on RedisVectorStoreFilterType #5015
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
auto:improvement
Medium size change to existing code to handle new use-cases
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
This is an issue created from the following discussion:
How to use RedisVectorStoreFilterType?
Current implementation of
RedisVectorStore
saves theDocument
's metadata object as a JSON string in the metadata-key field.This makes it impossible to search for multiple fields.
In order to make the
RedisVectorStore
more compatible to theDocument
metadata object, we need to change how metadata fields are stored and filtered.A use case for this is a vector store of books, which metadata with fields such as author (string), year (number) and tags (list of strings) would narrow the vector search and improve its results.
We can achieve this with
MemoryVectorStore
filter function, and I am pretty sure we can do the same with Redis.I can work on a PR for this if this interests the community.
Thank you.
System Info
langchain@0.1.31 | MIT | deps: 17 | versions: 262
The text was updated successfully, but these errors were encountered: