LightRAG icon indicating copy to clipboard operation
LightRAG copied to clipboard

[Question]:执行adelete_by_doc_id的时候doc_id如何填入

Open Larrybxs opened this issue 4 months ago • 3 comments

Do you need to ask a question?

  • [x] I have searched the existing question and discussions and this question is not already answered.
  • [ ] I believe this is a legitimate question, not just a bug or feature request.

Your Question

我在使用adelete_by_doc_id进行删除的时候,doc_id不知道该传入什么值,通过ainsert返回是None

Additional Context

No response

Larrybxs avatar Aug 29 '25 01:08 Larrybxs

你可以通过 get_docs_by_status 函数获得文档清单,里面有文档id。你也可以通过 Light Server 的 webui 界面查看获得文档id。

danielaskdd avatar Aug 29 '25 09:08 danielaskdd

你可以通过get_docs_by_status函数获取文档清单,里面有文档id。你也可以通过Light Server的webui界面查看获取文档id。

但是这里获取到文件内容中doc-xxxx的内容和chunk-xxxxx的内容不同,我执行delete的时候只能把kv_store_xxxx的文件内容清空,但是其他文件并不能删除掉,我使用的是1.2.3的lightrag版本

Larrybxs avatar Sep 02 '25 01:09 Larrybxs

请更新到v1.4.8版本。adelete_by_doc_id 会对收到影响的实体和关系描述进行重构,确保不再包含被删除文档的内容。

danielaskdd avatar Sep 16 '25 20:09 danielaskdd