Do you need to file an issue?
Describe the bug
Two issues related to handling deleted documents during index updates:
The code here fails if there are only documents to delete and no documents to add:
# Fail on empty delta dataset
if delta_dataset.new_inputs.empty:
error_msg = "Incremental Indexing Error: No new documents to process."
raise ValueError(error_msg)
|
if delta_dataset.new_inputs.empty: |
(related to
#1600)
In the same function, delta_dataset.deleted_inputs is not referenced and only delta_dataset.new_inputs is. So it looks like document deletion is not implemented. If that's the case, with some guidance I may be able to provide a PR.
Steps to reproduce
Run an index update with only documents to delete and no documents to add.
Expected Behavior
Updates containing only document deletions succeed and deleted documents are removed from the index.
GraphRAG Config Used
N/A
Logs and screenshots
No response
Additional Information
Do you need to file an issue?
Describe the bug
Two issues related to handling deleted documents during index updates:
The code here fails if there are only documents to delete and no documents to add:
graphrag/graphrag/index/run/run_workflows.py
Line 93 in 63042d2
(related to #1600)
In the same function,
delta_dataset.deleted_inputsis not referenced and onlydelta_dataset.new_inputsis. So it looks like document deletion is not implemented. If that's the case, with some guidance I may be able to provide a PR.Steps to reproduce
Run an index update with only documents to delete and no documents to add.
Expected Behavior
Updates containing only document deletions succeed and deleted documents are removed from the index.
GraphRAG Config Used
N/A
Logs and screenshots
No response
Additional Information