Current implementation of RedisVectorStore saves the Document'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 the Document 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.
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