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
|
```go
|
||||||
// search/config/defaults.go
|
// search/config/defaults.go
|
||||||
var SystemDefaults = Config{
|
var SystemDefaults = Config{
|
||||||
// Query processing options
|
// Keyword extraction options (uses.keyword)
|
||||||
Query: QueryConfig{
|
Keyword: KeywordConfig{
|
||||||
Keyword: KeywordConfig{
|
MaxKeywords: 10,
|
||||||
MaxKeywords: 10,
|
Language: "auto",
|
||||||
Language: "auto",
|
|
||||||
},
|
|
||||||
DSL: DSLConfig{
|
|
||||||
Strict: false,
|
|
||||||
},
|
|
||||||
// Note: Entity & Embedding config follow KB collection settings
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Rerank options
|
// QueryDSL generation options (uses.query)
|
||||||
|
Query: QueryConfig{
|
||||||
|
Strict: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Rerank options (uses.rerank)
|
||||||
Rerank: RerankConfig{
|
Rerank: RerankConfig{
|
||||||
TopN: 10,
|
TopN: 10,
|
||||||
},
|
},
|
||||||
|
|
@ -737,19 +736,18 @@ var SystemDefaults = Config{
|
||||||
"max_results": 20
|
"max_results": 20
|
||||||
},
|
},
|
||||||
|
|
||||||
// Query processing options
|
// Keyword extraction options (uses.keyword)
|
||||||
"query": {
|
"keyword": {
|
||||||
"keyword": {
|
"max_keywords": 10,
|
||||||
"max_keywords": 10,
|
"language": "auto" // "auto", "en", "zh", etc.
|
||||||
"language": "auto" // "auto", "en", "zh", etc.
|
|
||||||
},
|
|
||||||
"dsl": {
|
|
||||||
"strict": false // Strict mode: fail if DSL generation fails
|
|
||||||
}
|
|
||||||
// Note: entity & embedding follow KB collection config
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Rerank options
|
// QueryDSL generation options (uses.query)
|
||||||
|
"query": {
|
||||||
|
"strict": false // Strict mode: fail if generation fails
|
||||||
|
},
|
||||||
|
|
||||||
|
// Rerank options (uses.rerank)
|
||||||
"rerank": {
|
"rerank": {
|
||||||
"top_n": 10 // Return top N results after reranking
|
"top_n": 10 // Return top N results after reranking
|
||||||
},
|
},
|
||||||
|
|
@ -808,14 +806,14 @@ var SystemDefaults = Config{
|
||||||
"max_results": 20
|
"max_results": 20
|
||||||
},
|
},
|
||||||
|
|
||||||
// Overrides global query processing options
|
// Overrides global keyword options
|
||||||
|
"keyword": {
|
||||||
|
"max_keywords": 5
|
||||||
|
},
|
||||||
|
|
||||||
|
// Overrides global query options
|
||||||
"query": {
|
"query": {
|
||||||
"keyword": {
|
"strict": true
|
||||||
"max_keywords": 5
|
|
||||||
},
|
|
||||||
"dsl": {
|
|
||||||
"strict": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Overrides global rerank options
|
// Overrides global rerank options
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue