Implement Search() in Infinity in GO (#13645)

### What problem does this PR solve?

Implement Search() in Infinity in GO.

The function can handle the following request. 
"search '曹操' on datasets 'infinity'" 
"search '常胜将军' on datasets 'infinity'"
"search '卓越儒雅' on datasets 'infinity'"
"search '辅佐刘禅北伐中原' on datasets 'infinity'"

The output is exactly the same as  request to python Search()

### Type of change

- [ ] New Feature (non-breaking change which adds functionality)
This commit is contained in:
qinling0210
2026-03-17 16:45:45 +08:00
committed by GitHub
parent 549833b8a4
commit ca182dc188
9 changed files with 1023 additions and 303 deletions

View File

@ -414,7 +414,11 @@ func Init(configPath string) error {
// Map doc_engine section to DocEngineConfig
if globalConfig != nil && globalConfig.DocEngine.Type == "" {
// Try to map from doc_engine section
// Use DOC_ENGINE env var if set
if docEngine != "" {
globalConfig.DocEngine.Type = EngineType(docEngine)
}
// Try to map from doc_engine section (overrides env var if present)
if v.IsSet("doc_engine") {
docEngineConfig := v.Sub("doc_engine")
if docEngineConfig != nil {