neo4j-graphrag-python icon indicating copy to clipboard operation
neo4j-graphrag-python copied to clipboard

Support remove/delete an imported document by documentId

Open YikaiHu opened this issue 4 months ago • 1 comments

Hi team,

Does the project support remove a specific imported document by document id?

Thanks

YikaiHu avatar Sep 17 '25 06:09 YikaiHu

I don't think it is implemented as a method you can call (at least I did not find anything). Which doesn't mean that you cant do it. But if and how largely depends on your implementation.

The SimpleKGPipeline, as well as a custom pipeline with an LLMEntityRelationExtractor, by default has the "create_lexical_graph" parameter set to "True", which means it adds a node for your document which you can later retrieve by its ID.

Now if you used a resolver, which merges nodes that resemble the same entity, you cannot just go out and delete all nodes connected to your document node because they could already be merged with nodes from other documents.

How to entangle that situation I do not know, but maybe this is a starting point.

Powerkrieger avatar Oct 08 '25 07:10 Powerkrieger