Find answers from the community

Updated 4 weeks ago

How to Index Postgres Vector Database Based on Metadata Keys

Vector DB indexing question:
I am inserting nodes into VectorStoreIndex, and adding metadata to each node. Every time I am doing a RAG operation on the query engine, I will need to filter out each node based on 2 keys within the metadata.
Eg: the meta data will be
Plain Text
{"book": <str>, "page": <int>}

My Vector database is Postgres which allows for JSON indexing based on keys within a JSONField.
How can I tell LlamaIndex to index my db based on my metadata keys, or will I need to index the DB manually?
L
1 comment
I think you'd need to index the column manually
Add a reply
Sign up and join the conversation on Discord