Find answers from the community

Updated 9 months ago

Hi, I'm struggling a lot to understand

Hi, I'm struggling a lot to understand how I can update nodes in the database (i'm using PGVectorStore). For using update_ref_doc from VectorStoreIndex, I have to pass a Document as argument. But how can I recover a node from the database as a Document?
L
C
4 comments
Its meant to be used such that you've loaded the original document again (from a file, or elsewhere), with the same doc_id, expect now the content has changed
Hmm, thanks @Logan M . So the workflow of updating nodes that are saved in the database is not usual when working with LlamaIndex, is that right?

I was thinking about providing a kind of admin panel, where people from the company would curate and improve those documents on the fly.

And again, thanks for your reply!
Since documents are broken into nodes, you can still update those nodes, but you need to keep track of which nodes belong to which parent document (which is what the docstore is doing)

So if document changes, all its nodes change, and they have to be deleted/re-inserted

updating at the node level isn't too typical, but could be possible with some more custom code (people typically work at the document level though)
Ok, I'll change my mindset to work in that direction then. Thank you!
Add a reply
Sign up and join the conversation on Discord