From b554c303193aa5d22af5f8a4b91430077113e6db Mon Sep 17 00:00:00 2001
From: ax_rd <ax_rd@aisim.cn>
Date: Thu, 03 Sep 2026 13:21:36 +0800
Subject: [PATCH] fix: search 长 CJK 词 bigram 展开统一下沉(ExpandCJKKeywords 共享 + textScore 按 Expanded 档计权 + graph query 边 provenance 填充)
---
internal/graph/builder.go | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/internal/graph/builder.go b/internal/graph/builder.go
index d3fbd3e..9c89e7a 100644
--- a/internal/graph/builder.go
+++ b/internal/graph/builder.go
@@ -108,7 +108,8 @@
if base == link {
return node, "exact"
}
- if fuzzy == nil && strings.Contains(node.Title, link) {
+ // 空 link 跳过 fuzzy(Contains 对空串恒真)
+ if fuzzy == nil && link != "" && strings.Contains(node.Title, link) {
fuzzy = node
}
}
--
Gitblit v1.10.0