when the chunk has been edited, it can not be Retrievaled again. #14242

Closed
opened 2026-02-21 19:16:18 -05:00 by yindo · 7 comments
Owner

Originally created by @asking002 on GitHub (May 27, 2025).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、edit the chunk;
2、save the content,the chunk turns disable automatically;
3、only can enable the chunk by select it, and enable with the pop memu. the enable button is not work anymore;
4、try to retrieve the content,it doesn't work.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @asking002 on GitHub (May 27, 2025). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1、edit the chunk; 2、save the content,the chunk turns disable automatically; 3、only can enable the chunk by select it, and enable with the pop memu. the enable button is not work anymore; 4、try to retrieve the content,it doesn't work. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bugstale labels 2026-02-21 19:16:18 -05:00
yindo closed this issue 2026-02-21 19:16:18 -05:00
Author
Owner

@asking002 commented on GitHub (May 27, 2025):

Image this chunk can never retrieve.
@asking002 commented on GitHub (May 27, 2025): <img width="1233" alt="Image" src="https://github.com/user-attachments/assets/69929bbc-c2b1-4759-a75c-fe666bbf487c" /> this chunk can never retrieve.
Author
Owner

@asking002 commented on GitHub (May 27, 2025):

Image chunk 03 has not been edited, and the enable button still works.
@asking002 commented on GitHub (May 27, 2025): <img width="1208" alt="Image" src="https://github.com/user-attachments/assets/e5382a7e-59a5-40bc-b45c-fb905b62f165" /> chunk 03 has not been edited, and the enable button still works.
Author
Owner

@dosubot[bot] commented on GitHub (May 27, 2025):

Thank you for clarifying the difference between the edited and unedited chunks. Based on what you've described and what I've found in the codebase, when a chunk is edited and saved, it becomes disabled automatically and cannot be retrieved. The enable button also stops working for that chunk, and you can only re-enable it through a pop-up menu, but retrieval still fails.

The segment and chunk management logic in Dify involves enabling/disabling segments and updating their status via API calls. The functions responsible for this are useEnableSegment, useDisableSegment, and useUpdateSegment, which send PATCH requests to update the segment status or content. However, there is no documentation or code indicating why an edited chunk would become permanently disabled or unretrievable after editing, nor any recent changes that address this specific issue (source, source).

At this time, there is no known workaround or fix documented for this behavior in version 1.4.1. The issue appears to be a bug in how the system handles chunk status after editing. If you need to retrieve the chunk, you may try re-enabling it through the pop-up menu as you described, but if retrieval still fails, this confirms the bug.

If you have access to update your deployment, you may want to check for any newer releases or patches that address chunk editing and retrieval. Otherwise, further investigation by the maintainers may be required to resolve this issue in the codebase.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (May 27, 2025): <!-- Answer --> Thank you for clarifying the difference between the edited and unedited chunks. Based on what you've described and what I've found in the codebase, when a chunk is edited and saved, it becomes disabled automatically and cannot be retrieved. The enable button also stops working for that chunk, and you can only re-enable it through a pop-up menu, but retrieval still fails. The segment and chunk management logic in Dify involves enabling/disabling segments and updating their status via API calls. The functions responsible for this are useEnableSegment, useDisableSegment, and useUpdateSegment, which send PATCH requests to update the segment status or content. However, there is no documentation or code indicating why an edited chunk would become permanently disabled or unretrievable after editing, nor any recent changes that address this specific issue ([source](https://github.com/langgenius/dify/blob/main/web/service/knowledge/use-segment.ts), [source](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/dataset/segment.py)). At this time, there is no known workaround or fix documented for this behavior in version 1.4.1. The issue appears to be a bug in how the system handles chunk status after editing. If you need to retrieve the chunk, you may try re-enabling it through the pop-up menu as you described, but if retrieval still fails, this confirms the bug. If you have access to update your deployment, you may want to check for any newer releases or patches that address chunk editing and retrieval. Otherwise, further investigation by the maintainers may be required to resolve this issue in the codebase. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fe29a309-c8ac-4a65-9dad-df285190daa3?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20338)
Author
Owner

@asking002 commented on GitHub (May 27, 2025):

I have overwrite the volume folder from 1.3 to 1.4.1

@asking002 commented on GitHub (May 27, 2025): I have overwrite the volume folder from 1.3 to 1.4.1
Author
Owner

@Gevtolev commented on GitHub (May 30, 2025):

Image

When using version 1.4.1, the issue described did not reappear after editing the chunk.

@Gevtolev commented on GitHub (May 30, 2025): <img width="1489" alt="Image" src="https://github.com/user-attachments/assets/2cb9d0d6-7ed7-4bed-b273-eeb9720c9915" /> When using version 1.4.1, the issue described did not reappear after editing the chunk.
Author
Owner

@mattfeinstein-1 commented on GitHub (Jun 5, 2025):

Ran into a similar issue - trying to import chunks and embeddings into weaviate/postgres (instead of through file upload) - the imported chunks would show "edited" and could not be disabled, also wouldn't come back in retreival.

In postgres document_segments table, they were labeled with status "waiting", which would only become "completed" if the timestamps aligned with chunks from the rest of the document which had naturally been labeled as completed.

Hope this helps in some way, although might require digging into postgres

@mattfeinstein-1 commented on GitHub (Jun 5, 2025): Ran into a similar issue - trying to import chunks and embeddings into weaviate/postgres (instead of through file upload) - the imported chunks would show "edited" and could not be disabled, also wouldn't come back in retreival. In postgres document_segments table, they were labeled with status "waiting", which would only become "completed" if the timestamps aligned with chunks from the rest of the document which had naturally been labeled as completed. Hope this helps in some way, although might require digging into postgres
Author
Owner

@dosubot[bot] commented on GitHub (Aug 29, 2025):

Hi, @asking002. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a bug in Dify v1.4.1 (self-hosted via Docker) where edited chunks become disabled and cannot be re-enabled or retrieved.
  • The enable button stops working after editing, and attempts to re-enable via a pop-up menu fail.
  • A contributor confirmed this appears to be a bug with no current workaround in v1.4.1.
  • Other users have had mixed results reproducing the issue, with some noting related chunk status problems in the Postgres database.
  • No resolution or fix has been identified yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I don’t hear back within 15 days, I will automatically close this issue.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 29, 2025): Hi, @asking002. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a bug in Dify v1.4.1 (self-hosted via Docker) where edited chunks become disabled and cannot be re-enabled or retrieved. - The enable button stops working after editing, and attempts to re-enable via a pop-up menu fail. - A contributor confirmed this appears to be a bug with no current workaround in v1.4.1. - Other users have had mixed results reproducing the issue, with some noting related chunk status problems in the Postgres database. - No resolution or fix has been identified yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I don’t hear back within 15 days, I will automatically close this issue. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14242