knowledge cannot retrieve anything when filter with string conversation variable #12454

Closed
opened 2026-02-21 19:07:29 -05:00 by yindo · 2 comments
Owner

Originally created by @pistoolster on GitHub (Apr 1, 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.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when filtering metadata with string type variable, if select [is], return nothing:
Image

but when you select [contain], it can retrieve something:
Image

✔️ Expected Behavior

whether [is] option should be working like [equal] ?

Actual Behavior

It seems that the comparison is based on memory addresses rather than values.

Originally created by @pistoolster on GitHub (Apr 1, 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.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce when filtering metadata with string type variable, if select [is], return nothing: ![Image](https://github.com/user-attachments/assets/8bfdde22-939e-44e4-ba8e-3a62314bcd6b) but when you select [contain], it can retrieve something: ![Image](https://github.com/user-attachments/assets/bf0c25ab-cc66-4abb-8540-8dc17f14be1e) ### ✔️ Expected Behavior whether [is] option should be working like [equal] ? ### ❌ Actual Behavior It seems that the comparison is based on memory addresses rather than values.
yindo added the 🐞 bug label 2026-02-21 19:07:29 -05:00
yindo closed this issue 2026-02-21 19:07:29 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 1, 2025):

The "is" filter option in Dify version 1.1.3 is designed to require an exact match between the field's value and the input value. If the "is" filter returns nothing, it indicates that there are no exact matches for the input value in the string variable. This behavior is expected, as the "is" option should work like "equal," requiring an exact match [1][2][3].

If the "is" filter seems to be comparing memory addresses rather than values, it might be a bug or an implementation issue. You may want to check the code handling the filter logic to ensure it compares the actual string values rather than their memory addresses.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 1, 2025): <!-- Answer --> The "is" filter option in Dify version 1.1.3 is designed to require an exact match between the field's value and the input value. If the "is" filter returns nothing, it indicates that there are no exact matches for the input value in the string variable. This behavior is expected, as the "is" option should work like "equal," requiring an exact match <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/integrate-knowledge-within-application.md)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/rag/retrieval/dataset_retrieval.py)</sup>. If the "is" filter seems to be comparing memory addresses rather than values, it might be a bug or an implementation issue. You may want to check the code handling the filter logic to ensure it compares the actual string values rather than their memory addresses. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2a99669a-50fd-41f5-b273-25501b58882b?feedback_type=other)</sup>
Author
Owner

@pistoolster commented on GitHub (Apr 1, 2025):

it works well after docker restart, no idea why, but works...

@pistoolster commented on GitHub (Apr 1, 2025): it works well after docker restart, no idea why, but works...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12454