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?
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
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)