ax_rd
4 hours ago 60eb89c12ee0661785395bff90940204b16dcb3a
cmd/search.go
@@ -7,6 +7,7 @@
   "github.com/aisim/kb-cli/internal/index"
   "github.com/aisim/kb-cli/internal/search"
   "github.com/aisim/kb-cli/internal/llm"
   "github.com/aisim/kb-cli/internal/output"
   "github.com/spf13/cobra"
)
@@ -76,12 +77,18 @@
   }
   // 执行搜索
   cfg := llm.LoadConfig()
   textWeight := cfg.Search.TextWeight
   if textWeight <= 0 || textWeight > 1 {
      textWeight = 0.5 // 缺省 0.5
   }
   opts := search.SearchOptions{
      Expanded:    expanded,
      Symptom:     symptom,
      TopN:        topN,
      WithContent: withContent,
      WithLinks:   withLinks,
      TextWeight:  textWeight,
   }
   results, err := search.Search(store, allKeywords, opts)