Find answers from the community

Updated 2 months ago

I guess also update method is still not

I guess also, update method is still not functioning as expected, not deleting the original document, it just adds new document.

here's simple test code to reproduce index update related error.

Plain Text
from llama_index import GPTSimpleVectorIndex, Document

document1 = Document(text="11", doc_id="original_doc_id")
index = GPTSimpleVectorIndex.from_documents([document1])

print (index.docstore)
document1.text = "asdf"
index.update(document1)
print ("----------- after doc1 update ----------")
print (index.docstore)


this shows two documents created in index after updating document

Need your superpower logan! πŸ₯²
L
d
2 comments
I thiiiink this update thing will be fixed by this PR (hoping the user finishes it up soon πŸ™ )
https://github.com/jerryjliu/llama_index/pull/1195

For the issue about get_document problem, I'm actually super surprised that doesn't work πŸ˜… I'll see if I have time to look into that more later today
Thanks a loooooooot! I see the PR will do the trick for update feature!
Add a reply
Sign up and join the conversation on Discord