feat: 支持FAQ两级优先级标签过滤

添加FAQ搜索支持两级优先级标签过滤功能,新增first_priority_tag_ids和second_priority_tag_ids字段,更新各检索器实现以支持按标签ID过滤,优化搜索结果排序确保优先级标签结果优先展示。
This commit is contained in:
wizardchen
2025-12-30 16:15:09 +08:00
committed by lyingbug
parent 9e51f85e55
commit ac00206e77
16 changed files with 307 additions and 56 deletions
+5 -3
View File
@@ -85,9 +85,11 @@ type FAQDeleteRequest struct {
// FAQSearchRequest represents the hybrid FAQ search request.
type FAQSearchRequest struct {
QueryText string `json:"query_text"`
VectorThreshold float64 `json:"vector_threshold"`
MatchCount int `json:"match_count"`
QueryText string `json:"query_text"`
VectorThreshold float64 `json:"vector_threshold"`
MatchCount int `json:"match_count"`
FirstPriorityTagIDs []string `json:"first_priority_tag_ids"` // First priority tag IDs, highest priority
SecondPriorityTagIDs []string `json:"second_priority_tag_ids"` // Second priority tag IDs, lower than first
}
// FAQEntriesPage contains paginated FAQ results.