After using Add chunk, it cannot be found in Retrieval Test. #21020

Closed
opened 2026-02-21 20:10:17 -05:00 by yindo · 2 comments
Owner

Originally created by @lixc123 on GitHub (Dec 12, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image Image Image

Then I switched the embedding model and reindexed, and it showed up in the Retrieval Test.

Image Image

In summary, after adding text segments using Add Chunk, they weren't found in the Retrieval Test search, but re-indexing them after switching the embedding worked.

✔️ Expected Behavior

After using the "Add chunk" command, the search results will be available immediately.

Actual Behavior

No response

Originally created by @lixc123 on GitHub (Dec 12, 2025). ### 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.11.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="1609" height="823" alt="Image" src="https://github.com/user-attachments/assets/9cbb1ceb-511d-484e-9819-e75f9374b6eb" /> <img width="1680" height="781" alt="Image" src="https://github.com/user-attachments/assets/880dca9b-47df-4a21-86b7-5b4e679b78dc" /> <img width="1675" height="645" alt="Image" src="https://github.com/user-attachments/assets/d68c6ff7-bec7-4bb1-b77a-d2af04cee4bc" /> Then I switched the embedding model and reindexed, and it showed up in the Retrieval Test. <img width="1290" height="482" alt="Image" src="https://github.com/user-attachments/assets/a595da51-30b4-47db-822d-19392407b254" /> <img width="1690" height="681" alt="Image" src="https://github.com/user-attachments/assets/934c30b7-23de-449d-874d-d333d82eec4a" /> In summary, after adding text segments using Add Chunk, they weren't found in the Retrieval Test search, but re-indexing them after switching the embedding worked. ### ✔️ Expected Behavior After using the "Add chunk" command, the search results will be available immediately. ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:10:17 -05:00
yindo closed this issue 2026-02-21 20:10:17 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 12, 2025):

This is a known issue: when you use "Add Chunk," the backend immediately creates the chunk and triggers embedding and indexing, so in theory, the new chunk should be searchable right away. However, in practice, there can be a delay before the chunk appears in Retrieval Test due to vector store propagation, caching, or possible bugs in the vector index implementation. Switching the embedding model and reindexing forces a full rebuild of the vector index, which is why the chunk becomes searchable after that step.

There’s no explicit requirement in the code for a reindex or model switch after adding a chunk, so the expected behavior is immediate searchability. If you encounter this issue, common workarounds are to wait for background processing, try re-saving or re-uploading the chunk, or trigger a reindex by switching embedding models or toggling file enable/disable status. If the problem persists, checking logs for errors or delays in the vector store can help pinpoint the cause. This behavior has been reported by other users as well, and as of now, there’s no direct fix in recent releases—further investigation into the vector store integration may be needed for a permanent solution.
Reference 1 | Reference 2 | Reference 3

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 12, 2025): <!-- Answer --> This is a known issue: when you use "Add Chunk," the backend immediately creates the chunk and triggers embedding and indexing, so in theory, the new chunk should be searchable right away. However, in practice, there can be a delay before the chunk appears in Retrieval Test due to vector store propagation, caching, or possible bugs in the vector index implementation. Switching the embedding model and reindexing forces a full rebuild of the vector index, which is why the chunk becomes searchable after that step. There’s no explicit requirement in the code for a reindex or model switch after adding a chunk, so the expected behavior is immediate searchability. If you encounter this issue, common workarounds are to wait for background processing, try re-saving or re-uploading the chunk, or trigger a reindex by switching embedding models or toggling file enable/disable status. If the problem persists, checking logs for errors or delays in the vector store can help pinpoint the cause. This behavior has been reported by other users as well, and as of now, there’s no direct fix in recent releases—further investigation into the vector store integration may be needed for a permanent solution. [Reference 1](https://github.com/langgenius/dify/issues/21964) | [Reference 2](https://github.com/langgenius/dify/blob/886ce981cf13d4724b9f82be251f91c090fe1354/api/services/vector_service.py#L21-L340) | [Reference 3](https://github.com/langgenius/dify/issues/29243) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0145dc06-275c-4406-9727-0a6a6562a2b3?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%3A%20when%20you%20use%20%22Add%20Chunk%2C%22%20the%20backend%20immediately%20creates%20the%20chunk%20and%20triggers%20embedding%20and%20indexing%2C%20so%20in%20theory%2C%20the%20new%20chunk%20should%20be%20searchable%20right%20away.%20However%2C%20in%20practice%2C%20there%20can%20be%20a%20delay%20before%20the%20chunk%20appears%20in%20Retrieval%20Test%20due%20to%20vector%20store%20propagation%2C%20caching%2C%20or%20possible%20bugs%20in%20the%20vector%20index%20implementation.%20Switching%20the%20embedding%20model%20and%20reindexing%20forces%20a%20full%20rebuild%20of%20the%20vector%20index%2C%20which%20is%20why%20the%20chunk%20becomes%20searchable%20after%20that%20step.%0A%0AThere%E2%80%99s%20no%20explicit%20requirement%20in%20the%20code%20for%20a%20reindex%20or%20model%20switch%20after%20adding%20a%20chunk%2C%20so%20the%20expected%20behavior%20is%20immediate%20searchability.%20If%20you%20encounter%20this%20issue%2C%20common%20workarounds%20are%20to%20wait%20for%20background%20processing%2C%20try%20re-saving%20or%20re-uploading%20the%20chunk%2C%20or%20trigger%20a%20reindex%20by%20switching%20embedding%20models%20or%20toggling%20file%20enable/disable%20status.%20If%20the%20problem%20persists%2C%20checking%20logs%20for%20errors%20or%20delays%20in%20the%20vector%20store%20can%20help%20pinpoint%20the%20cause.%20This%20behavior%20has%20been%20reported%20by%20other%20users%20as%20well%2C%20and%20as%20of%20now%2C%20there%E2%80%99s%20no%20direct%20fix%20in%20recent%20releases%E2%80%94further%20investigation%20into%20the%20vector%20store%20integration%20may%20be%20needed%20for%20a%20permanent%20solution.%20%20%0A%5BReference%201%5D%28https%3A//github.com/langgenius/dify/issues/21964%29%20%7C%20%5BReference%202%5D%28https%3A//github.com/langgenius/dify/blob/886ce981cf13d4724b9f82be251f91c090fe1354/api/services/vector_service.py%23L21-L340%29%20%7C%20%5BReference%203%5D%28https%3A//github.com/langgenius/dify/issues/29243%29)&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/29604)
Author
Owner

@Chenyl-Sai commented on GitHub (Dec 14, 2025):

This is because when add chunk without attachment_ids or keywords, it will not save them to the vdb

@Chenyl-Sai commented on GitHub (Dec 14, 2025): This is because when add chunk without `attachment_ids` or `keywords`, it will not save them to the vdb
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21020