{"record":{"id":"db84a2d202987871","repo":"fish2018/pansou","slug":"s-db84a2","errorCode":null,"errorMessage":"[%s] 未找到相关结果","messagePattern":"\\[(.+?)\\] 未找到相关结果","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugin/lou1/lou1.go","lineNumber":113,"sourceCode":"\treturn p.AsyncSearchWithResult(keyword, p.searchImpl, p.MainCacheKey, ext)\n}\n\nfunc (p *Lou1Plugin) searchImpl(client *http.Client, keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {\n\tif p.client != nil {\n\t\tclient = p.client\n\t}\n\n\tsearchKeyword := strings.TrimSpace(keyword)\n\tif searchKeyword == \"\" {\n\t\treturn nil, fmt.Errorf(\"[%s] 关键词不能为空\", p.Name())\n\t}\n\n\tthreads, err := p.fetchSearchResults(client, searchKeyword)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(threads) == 0 {\n\t\treturn nil, fmt.Errorf(\"[%s] 未找到相关结果\", p.Name())\n\t}\n\n\tvar (\n\t\twg      sync.WaitGroup\n\t\tresultM sync.Mutex\n\t\tresults []model.SearchResult\n\t\tsem     = make(chan struct{}, detailWorkers)\n\t)\n\n\tfor _, thread := range threads {\n\t\tthread := thread\n\t\twg.Add(1)\n\t\tsem <- struct{}{}\n\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\tdefer func() { <-sem }()\n","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/lou1/lou1.go#L95-L131","documentation":"After a successful search request, searchImpl checks whether Lou1 returned any threads. If the parsed result list is empty it raises this error because there is nothing to fan out over. It distinguishes 'request worked, no matches' from request failures.","triggerScenarios":"The upstream search JSON parsed fine but contained zero hits for the keyword (len(threads)==0).","commonSituations":"Very obscure or misspelled search terms; upstream index does not yet contain the title; site changed its search scope so common terms return nothing.","solutions":["Retry with a broader or corrected keyword","Verify the term exists on the Lou1 site in a browser","Check whether the plugin's search URL/parameters are still valid after a site redesign","Treat as a normal empty result in your caller rather than a hard failure"],"exampleFix":"// before\nresults, err := lou1.Search(kw)\nif err != nil { return err }\n// after\nresults, err := lou1.Search(kw)\nif err != nil {\n    if strings.Contains(err.Error(), \"未找到相关结果\") { return nil, nil }\n    return err\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"results, err := lou1.Search(kw)\nif err != nil && strings.Contains(err.Error(), \"未找到相关结果\") {\n    return tryAlternatePlugins(kw) // fall back to other sources\n}","preventionTips":["Treat empty search results as an expected, non-fatal outcome","Offer alternate plugins/sources when one returns nothing","Log keywords that yield empty results to spot index gaps"],"tags":["search","empty-result","upstream"],"backgroundTag":"empty-result-set","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}