From 5a2be87f658d01bc5b3b7ecdba92ac69bf09dcf7 Mon Sep 17 00:00:00 2001
From: ai_xiaopei <xiaopei@aisim.cn>
Date: Thu, 03 Sep 2026 15:15:37 +0800
Subject: [PATCH] fix(search): 搜索准确性四连修——FTS5 MATCH 引号包裹(连字符不再被解析成 MINUS);KeywordSearch 截断按命中关键词数排序(高频 bigram 不再挤出强相关文档);原词奖励档(完整短语压过泛化 bigram);tags 字段真实参与评分(此前误用 Section)
---
internal/search/explore_test.go | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/internal/search/explore_test.go b/internal/search/explore_test.go
index 1bba277..bfe2677 100644
--- a/internal/search/explore_test.go
+++ b/internal/search/explore_test.go
@@ -29,7 +29,7 @@
// TestExploreKeywordExpansion 长 CJK 词拆 bigram(原词保留,ASCII/短词不拆;末尾去重保序)
func TestExploreKeywordExpansion(t *testing.T) {
- got := expandKeywords([]string{"电子秤补气失败", "补气", "abc"})
+ got := ExpandCJKKeywords([]string{"电子秤补气失败", "补气", "abc"})
want := []string{"电子秤补气失败", "电子", "子秤", "秤补", "补气", "气失", "失败", "abc"}
if len(got) != len(want) {
t.Fatalf("展开数量: got=%d want=%d (%v)", len(got), len(want), got)
--
Gitblit v1.10.0