Find answers from the community

Updated 2 years ago

Delete

Hey @Logan M, around a week ago I know you pushed a fix for the issue affecting deleting documents from an index that's stored as a json file. I just updated my llama-index to the latest version, but I think part of the issue still persists. When a document is deleted, all the data related to it is removed from the index_struct object, but nothing is removed from the docstore object. I think it has to do with this method
Plain Text
    def _delete(self, doc_id: str, **delete_kwargs: Any) -> None:
        """Delete a document."""
        self._index_struct.delete(doc_id)
        self._vector_store.delete(doc_id)

You might need to include self._docstore.delete_document(doc_id) here
L
k
4 comments
Ooo good catch! I think you are right

I can make a PR in a bit. Or you can definitely make one too! πŸ’ͺ
gotcha, I can make one!
Amazing! Thanks! πŸ’ͺπŸ’ͺ
Add a reply
Sign up and join the conversation on Discord