Is it possible to delete documents using doc_id from document summary index? I'm having trouble using the summary_index.delete_ref_doc(doc_id, delete_from_docstore=True) method, it raises an exception: Error: node_id 68d98611-0825-4ff5-955f-0c63ac573c98 not in index.
It exists. I think the document summary index implementation of the _delete_node is incorrect. Here is the relevant snippet: def _delete_node(self, node_id: str, **delete_kwargs: Any) -> None: """Delete a node.""" if node_id not in self._index_struct.doc_id_to_summary_id: raise ValueError(f"node_id {node_id} not in index") summary_id = self._index_struct.doc_id_to_summary_id[node_id]
# delete summary node from docstore self.docstore.delete_document(summary_id)
# delete from index struct self._index_struct.delete(node_id)