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/index/cache.go |   32 --------------------------------
 1 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/internal/index/cache.go b/internal/index/cache.go
index b54860c..74b64c7 100644
--- a/internal/index/cache.go
+++ b/internal/index/cache.go
@@ -14,35 +14,3 @@
 	}
 	return strings.TrimSpace(string(out)), nil
 }
-
-// NeedsRebuild 检查是否需要重建索引
-func NeedsRebuild(store *Store, vaultPath string) (bool, string, error) {
-	currentCommit, err := GetGitCommit(vaultPath)
-	if err != nil {
-		// 不是 git 仓库,总是需要重建
-		return true, "", nil
-	}
-
-	storedCommit, err := store.GetMeta("git_commit")
-	if err != nil {
-		return true, currentCommit, nil
-	}
-
-	if storedCommit == "" {
-		// 没有记录,需要重建
-		return true, currentCommit, nil
-	}
-
-	if storedCommit != currentCommit {
-		// commit 变了,需要重建
-		return true, currentCommit, nil
-	}
-
-	// 检查是否有节点
-	count, _ := store.NodeCount()
-	if count == 0 {
-		return true, currentCommit, nil
-	}
-
-	return false, currentCommit, nil
-}

--
Gitblit v1.10.0