Find answers from the community

s
F
Y
a
P
Updated last month

Hi im having trouble deleting a file

Hi im having trouble deleting a file from an index while using the DocumentSummaryIndex.
L
7 comments
When you execute index.delete_ref_doc(doc._id) it does not work
Added for extra info so i can explain myself better
Attachment
Screenshot_2024-01-24_at_11.21.19.png
There are two problems in this flow. 1. The IndexDocumentSummary expects a doc_id, if you look at the previous steps the argument is the node_id
In step 1 the ref_doc_info is recovered form self.docstore.get_ref_doc_info(ref_doc_id). In my case (Can some one explain me why) each document has 2 nodes, but only one is used for the document summary so only one is in the self._index_sturct.node_id_to_summary_id dictionary
Which this causes is an error on step 3
I see that this steps are programmed by @jerryjliu0 and @Logan M . If any of you could help me understand this better maybe I can open a PR
Add a reply
Sign up and join the conversation on Discord