Refactor DESIGN.md to clarify configuration options for search processing tools

- Updated comments and structure in the configuration section to better distinguish between keyword extraction, QueryDSL generation, and rerank options.
- Removed redundant comments and streamlined the configuration keys for improved clarity and consistency.
- Enhanced documentation to reflect the new organization of configuration settings, aiding in understanding the search module's functionality.
This commit is contained in:
Max 2025-12-12 10:06:27 +08:00
parent cf6f342e42
commit 7106b01f90

View file

@ -676,19 +676,18 @@ These are the hardcoded defaults when no configuration is provided:
```go
// search/config/defaults.go
var SystemDefaults = Config{
// Query processing options
Query: QueryConfig{
// Keyword extraction options (uses.keyword)
Keyword: KeywordConfig{
MaxKeywords: 10,
Language: "auto",
},
DSL: DSLConfig{
// QueryDSL generation options (uses.query)
Query: QueryConfig{
Strict: false,
},
// Note: Entity & Embedding config follow KB collection settings
},
// Rerank options
// Rerank options (uses.rerank)
Rerank: RerankConfig{
TopN: 10,
},
@ -737,19 +736,18 @@ var SystemDefaults = Config{
"max_results": 20
},
// Query processing options
"query": {
// Keyword extraction options (uses.keyword)
"keyword": {
"max_keywords": 10,
"language": "auto" // "auto", "en", "zh", etc.
},
"dsl": {
"strict": false // Strict mode: fail if DSL generation fails
}
// Note: entity & embedding follow KB collection config
// QueryDSL generation options (uses.query)
"query": {
"strict": false // Strict mode: fail if generation fails
},
// Rerank options
// Rerank options (uses.rerank)
"rerank": {
"top_n": 10 // Return top N results after reranking
},
@ -808,14 +806,14 @@ var SystemDefaults = Config{
"max_results": 20
},
// Overrides global query processing options
"query": {
// Overrides global keyword options
"keyword": {
"max_keywords": 5
},
"dsl": {
// Overrides global query options
"query": {
"strict": true
}
},
// Overrides global rerank options