Summary Index: data does not be cleared when upload an exists document
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 24.6k
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 610
Description
### Self Checks
- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
### Dify version
1.14.2
### Cloud or Self Hosted
Self Hosted (Docker)
### Steps to reproduce
Step:
1. Upload a file and turn on [Enable Summary]. Chunk summary is successful created.
2. Upload same file to same dataset. (From now, Summary setting is disappered)
3. Summary will not be regenrated at all. But summary data is still in database. (Vector data seems like same)
4. Regerate summary from button at the top of the page. New summary generated but old data still in the database.
Postion:
When upload same file, knowledge_config.duplicate is True and only go into DuplicateDocumentIndexingTask.
https://github.com/langgenius/dify/blob/eae44cfecb65957d00cfcb727217652e04be57e1/api/services/dataset_service.py#L2307-L2312
### ✔️ Expected Behavior
- Generate new summary when upload same file.
- Clear old summary pg data.
- Clear old summary vector data.
### ❌ Actual Behavior
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.