diff --git a/go/internal/api/routes/core.go b/go/internal/api/routes/core.go index d232c00..270741f 100644 --- a/go/internal/api/routes/core.go +++ b/go/internal/api/routes/core.go @@ -268,7 +268,7 @@ func (a *API) Feedback(w http.ResponseWriter, r *http.Request) { return } field := "useful_count" - val := map[string]int{"$inc": 1} + val := map[string]interface{}{"$inc": 1} if !req.Useful { field = "not_useful_count" } diff --git a/go/internal/storage/lancedb_ipc.go b/go/internal/storage/lancedb_ipc.go index 93fd9d6..783e764 100644 --- a/go/internal/storage/lancedb_ipc.go +++ b/go/internal/storage/lancedb_ipc.go @@ -157,12 +157,12 @@ func (rc *RustLanceDBClient) Search(table string, vector []float32, topK int, na Tier string `json:"tier"` LastRecalledAt string `json:"last_recalled_at"` } - json.Unmarshal([]byte(resp.Result), &raw) + json.Unmarshal([]byte(resp.ReportJSON), &raw) if len(raw) == 0 { - log.Printf("[ipc] Search: resp.Result unmarshal gave 0 results (ReportJSON=%q), falling back to localSearch", resp.ReportJSON) + log.Printf("[ipc] Search: resp.ReportJSON unmarshal gave 0 results, falling back to localSearch (Result=%q)", resp.Result) return rc.localSearch(vector, topK, namespaceFilter), nil } - log.Printf("[ipc] Search: got %d results from Rust IPC (ReportJSON=%q)", len(raw), resp.ReportJSON) + log.Printf("[ipc] Search: got %d results from Rust IPC (Result=%q)", len(raw), resp.Result) // 解析时间(Rust 返回 RFC3339 字符串 → time.Time) parseTime := func(s string) time.Time {