Find answers from the community

Updated last year

Hi all, I have a question regarding the

Hi all, I have a question regarding the custom VectorStore Postgres table.
  1. How do I add other columns? From PGVectorStore, it creates id, text, metadata, node_id, and embedding only. How can I add another column like user_id?
  1. When I generate indexes, I want to generate vector index, keyword index, and list index. How can I store these three indexes in one table? The table column names like id, text, metadata, node_id, embedding, vector_index, keyword_index, list_index
  1. how to store keyword index in Postgres? From the tutorial keyword_index is generated by GPTKeywordTableIndex. and I modify the code as below:
vector_store = PGVectorStore.from_params(... )
storage_context = StorageContext.from_defaults(vector_store=vector_store)
storage_context.docstore.add_documents(nodes)
keyword_index=GPTKeywordTableIndex(nodes, storage_context=storage_context)
I am not sure if this is working or not because I cannot find any data from the table that was assigned or other tables in the database. no error messages.
d
J
4 comments
hey @Jo , if you are trying to do hybrid (keyword and semantic) search in Postgres, you should direclty use the hybrid_search mode in postgres (https://docs.llamaindex.ai/en/stable/examples/vector_stores/postgres.html#hybrid-search)
The KeywordTableIndex requires an additional document store and index store (which by default uses the simple in memory option)
we only support the vector store index via postgres right now, so you can't add the keyword index, list index, etc to the table
Got it. so that means I cannot customize the table like add columns right?
Add a reply
Sign up and join the conversation on Discord