{"record":{"id":"66b4bdebb78a45b3","repo":"AlistGo/alist","slug":"not-support-index-s","errorCode":null,"errorMessage":"not support index: %s","messagePattern":"not support index: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/search/search.go","lineNumber":39,"sourceCode":"\t\tif instance.Config().Name == mode {\n\t\t\treturn nil\n\t\t}\n\t\terr := instance.Release(context.Background())\n\t\tif err != nil {\n\t\t\tlog.Errorf(\"release instance err: %+v\", err)\n\t\t}\n\t\tinstance = nil\n\t}\n\tif Running() {\n\t\treturn fmt.Errorf(\"index is running\")\n\t}\n\tif mode == \"none\" {\n\t\tlog.Warnf(\"not enable search\")\n\t\treturn nil\n\t}\n\ts, ok := searcher.NewMap[mode]\n\tif !ok {\n\t\treturn fmt.Errorf(\"not support index: %s\", mode)\n\t}\n\ti, err := s()\n\tif err != nil {\n\t\tlog.Errorf(\"init searcher error: %+v\", err)\n\t} else {\n\t\tinstance = i\n\t}\n\treturn err\n}\n\nfunc Search(ctx context.Context, req model.SearchReq) ([]model.SearchNode, int64, error) {\n\treturn instance.Search(ctx, req)\n}\n\nfunc Index(ctx context.Context, parent string, obj model.Obj) error {\n\tif instance == nil {\n\t\treturn errs.SearchNotAvailable\n\t}","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/internal/search/search.go#L21-L57","documentation":"search.Init(mode) looks the requested mode up in searcher.NewMap and it is not a registered searcher backend, so the configured index type string is rejected. Registered names come from the compiled-in searcher registry (database, meilisearch, ...; 'none' is handled earlier with a warning).","triggerScenarios":"Setting the search config to a string that is not a built-in searcher name — typos like 'meilisearch ' (trailing space), 'MeiliSearch' (case), or a build where that searcher was not compiled in.","commonSituations":"Editing settings manually or via API with wrong casing/whitespace; using a config value carried over from a fork or plugin that this binary does not include.","solutions":["Set the search mode to an exact registered value (check searcher.NewMap keys in your build, e.g. 'database', 'meilisearch', or 'none')","Remove surrounding whitespace and match lowercase spelling","If you expect a custom backend, verify the binary actually includes it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var supportedSearchModes = map[string]bool{\"none\": true, \"database\": true, \"meilisearch\": true}\nmode = strings.TrimSpace(strings.ToLower(mode))\nif !supportedSearchModes[mode] {\n    return fmt.Errorf(\"unsupported search mode %q\", mode)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Offer search mode as a dropdown, never free text","Validate config values at load time against searcher.NewMap keys","Trim/case-normalize user-supplied mode strings"],"tags":["go","search","configuration","validation"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}