Search by metadata value in KB documents list
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I have a huge knowledge and the search functionality that relies only on the name of the doc, is not enough to find what I need.
Having the ability to search by metadata values would be much appreciated
2. Additional context or comments
No response
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Hi! I'd like to work on this issue.
I understand you need metadata-based search/filtering in the knowledge base documents list, beyond the current name-only search. This would help manage large knowledge bases more efficiently.
My proposed approach:
Backend:
- Extend the existing
/datasets/{id}/documentsAPI endpoint to accept metadata filter parameters - Reference the metadata filtering logic already implemented in Knowledge Retrieval nodes (PR #15982)
- Add support for filtering by multiple metadata fields with AND/OR logic
Frontend:
- Add a metadata search component to the documents list page
- Display filter chips/tags for active metadata filters
- Allow users to search by any custom metadata field they've created
- Maintain existing name search functionality
Questions:
- Should metadata search work alongside the existing name search (combined filters)?
- Any preference for UI placement - separate metadata filter section or integrated into the main search bar?
- Should this support all metadata types (string, number, time)?
I've reviewed the existing metadata filtering implementation in the Knowledge Retrieval node and the documents list API structure. I can have an initial PR ready within 1-2 weeks.
Let me know if this approach aligns with your expectations!
The search text box should probably remain. The metadata filters component should probably be reusable for the hit test page too since it lacks metadata
@crazywoola can you confirm with product team if this is ok?
@DavideDelbianco I will check it with our PM regarding this issue.
@crazywoola did you have time to check? Without UI or API supporting this feature, I have a hard time figuring out which documents are missing a metadata value in a 2388 doc KB