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 填充) --- Makefile | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c772d23..f0daa47 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,24 @@ -.PHONY: build test clean install +# Makefile +CGO_CFLAGS := -DSQLITE_ENABLE_FTS5 +CGO_LDFLAGS := -lm + +.PHONY: build test clean install test-v run-search run-index run-status # 构建 build: - CGO_ENABLED=1 go build -tags fts5 -o bin/kb-cli . + CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o bin/kb-cli . # 安装到 ~/go/bin install: - CGO_ENABLED=1 go install -tags fts5 . + CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go install . # 测试 test: - CGO_ENABLED=1 go test -tags fts5 ./... + CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test ./... 2>&1 | grep -v "no test files" # 详细测试 test-v: - CGO_ENABLED=1 go test -tags fts5 -v ./... + CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v ./... 2>&1 | grep -v "no test files" # 清理 clean: -- Gitblit v1.10.0