Refa: refactor metadata filter (#11907)

### What problem does this PR solve?

Refactor metadata filter.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Refactoring

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
Yongteng Lei
2025-12-12 17:12:38 +08:00
committed by GitHub
parent 0fcb1680fd
commit 0f0fb53256
10 changed files with 229 additions and 269 deletions

View File

@ -75,6 +75,7 @@ export const useTestRetrieval = () => {
page,
size: pageSize,
doc_ids: filterValue.doc_ids,
highlight: true,
};
}, [filterValue, knowledgeBaseId, page, pageSize, values]);

View File

@ -209,7 +209,11 @@ export default function SearchingView({
<div
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(
`${chunk.highlight}...`,
`${
chunk.highlight ??
chunk.content_with_weight ??
''
}...`,
),
}}
className="text-sm text-text-primary mb-1"