[PR #29619] fix: keyword search now matches both content and keywords fields #32491

Closed
opened 2026-02-21 20:51:30 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/29619

State: closed
Merged: Yes


Summary

  • The keyword parameter in KB segment retrieval API now searches both content and keywords fields
  • Uses OR condition with ILIKE for case-insensitive matching
  • The keywords JSON array field is cast to String for pattern matching

Fixes #29522

Test plan

  • Lint check passes
  • Manual testing: Search for a keyword that exists only in the keywords field (not in content)
  • Verify segments are returned when keyword matches either field
**Original Pull Request:** https://github.com/langgenius/dify/pull/29619 **State:** closed **Merged:** Yes --- ## Summary - The `keyword` parameter in KB segment retrieval API now searches both `content` and `keywords` fields - Uses `OR` condition with `ILIKE` for case-insensitive matching - The `keywords` JSON array field is cast to String for pattern matching Fixes #29522 ## Test plan - [x] Lint check passes - [ ] Manual testing: Search for a keyword that exists only in the `keywords` field (not in `content`) - [ ] Verify segments are returned when keyword matches either field
yindo added the pull-request label 2026-02-21 20:51:30 -05:00
yindo closed this issue 2026-02-21 20:51:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32491