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:
parent
cf6f342e42
commit
7106b01f90
1 changed files with 27 additions and 29 deletions
|
|
@ -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: KeywordConfig{
|
||||
MaxKeywords: 10,
|
||||
Language: "auto",
|
||||
},
|
||||
DSL: DSLConfig{
|
||||
Strict: false,
|
||||
},
|
||||
// Note: Entity & Embedding config follow KB collection settings
|
||||
// Keyword extraction options (uses.keyword)
|
||||
Keyword: KeywordConfig{
|
||||
MaxKeywords: 10,
|
||||
Language: "auto",
|
||||
},
|
||||
|
||||
// Rerank options
|
||||
// QueryDSL generation options (uses.query)
|
||||
Query: QueryConfig{
|
||||
Strict: false,
|
||||
},
|
||||
|
||||
// Rerank options (uses.rerank)
|
||||
Rerank: RerankConfig{
|
||||
TopN: 10,
|
||||
},
|
||||
|
|
@ -737,19 +736,18 @@ var SystemDefaults = Config{
|
|||
"max_results": 20
|
||||
},
|
||||
|
||||
// Query processing options
|
||||
"query": {
|
||||
"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
|
||||
// Keyword extraction options (uses.keyword)
|
||||
"keyword": {
|
||||
"max_keywords": 10,
|
||||
"language": "auto" // "auto", "en", "zh", etc.
|
||||
},
|
||||
|
||||
// Rerank options
|
||||
// QueryDSL generation options (uses.query)
|
||||
"query": {
|
||||
"strict": false // Strict mode: fail if generation fails
|
||||
},
|
||||
|
||||
// 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
|
||||
// Overrides global keyword options
|
||||
"keyword": {
|
||||
"max_keywords": 5
|
||||
},
|
||||
|
||||
// Overrides global query options
|
||||
"query": {
|
||||
"keyword": {
|
||||
"max_keywords": 5
|
||||
},
|
||||
"dsl": {
|
||||
"strict": true
|
||||
}
|
||||
"strict": true
|
||||
},
|
||||
|
||||
// Overrides global rerank options
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue