Find answers from the community

Updated 2 months ago

Document management

Hi everybody, hope everyone is doing great. I've been working with PGVectorStore and now I have an issue that is I wanted check if a specific document has been inserted or not. In my case I'm downloading documents from a gdrive and I wanted first to check that if the gdrive document is loaded in postgresql previously or not. If not, I would do store its document in postgresql. Is there any possible way someone can think for this?
W
A
2 comments
You can try setting the filename as DocID. Now with this the documents to be inserted will have a unique ID associated with them.


So in the next turn you can use index.refresh_ref_docs to add. It will not change the previous records if they are same and will only change the nodes which have changes in it or are completely new.


You can check Document management here for more: https://docs.llamaindex.ai/en/stable/module_guides/indexing/document_management.html#refresh
Thanks WhiteFrang_Jr. Your answer is very useful πŸ™‚ πŸ™πŸ»
Add a reply
Sign up and join the conversation on Discord