{"id":"e07e89199b86aa8f","repo":"go-redis/redis","slug":"ftexplaincli-is-not-implemented","errorCode":null,"errorMessage":"FTExplainCli is not implemented","messagePattern":"FTExplainCli is not implemented","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"search_commands.go","lineNumber":1741,"sourceCode":"// The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query.\n// For more information, please refer to the Redis documentation:\n// [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)\nfunc (c cmdable) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd {\n\targs := []interface{}{\"FT.EXPLAIN\", index, query}\n\tif options.Dialect != \"\" {\n\t\targs = append(args, \"DIALECT\", options.Dialect)\n\t} else {\n\t\targs = append(args, \"DIALECT\", 2)\n\t}\n\tcmd := NewStringCmd(ctx, args...)\n\t_ = c(ctx, cmd)\n\treturn cmd\n}\n\n// FTExplainCli - Returns the execution plan for a complex query. [Not Implemented]\n// For more information, see https://redis.io/commands/ft.explaincli/\nfunc (c cmdable) FTExplainCli(ctx context.Context, key, path string) error {\n\treturn fmt.Errorf(\"FTExplainCli is not implemented\")\n}\n\n// parseFTAttributeFromMap parses an FTAttribute from a RESP3 map format\nfunc parseFTAttributeFromMap(attrMap map[interface{}]interface{}) FTAttribute {\n\tatt := FTAttribute{}\n\tfor k, v := range attrMap {\n\t\tkey := internal.ToLower(internal.ToString(k))\n\t\tswitch key {\n\t\tcase \"attribute\":\n\t\t\tatt.Attribute = internal.ToString(v)\n\t\tcase \"identifier\":\n\t\t\tatt.Identifier = internal.ToString(v)\n\t\tcase \"type\":\n\t\t\tatt.Type = internal.ToString(v)\n\t\tcase \"weight\":\n\t\t\tatt.Weight = internal.ToFloat(v)\n\t\tcase \"phonetic\":\n\t\t\tatt.PhoneticMatcher = internal.ToString(v)","sourceCodeStart":1723,"sourceCodeEnd":1759,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/search_commands.go#L1723-L1759","documentation":"FTExplainCli is a stub that always returns this error; FT.EXPLAINCLI was deprecated and removed from RediSearch, so go-redis never sends it. The method exists only for API discoverability and deliberately errors at search_commands.go:1741.","triggerScenarios":"Calling client.FTExplainCli(ctx, key, path). Any call returns the error immediately without touching the connection.","commonSituations":"Porting code from an older client/docs that referenced FT.EXPLAINCLI, or autocomplete suggesting FTExplainCli next to FTExplain.","solutions":["Use FTExplain or FTExplainWithArgs instead, which return the execution plan for a query.","Remove all FTExplainCli references from your code; it cannot be made to work.","If you need CLI-style output, run redis-cli directly against the server."],"exampleFix":"// before\nclient.FTExplainCli(ctx, \"myidx\", q)\n\n// after\nclient.FTExplainWithArgs(ctx, \"myidx\", q, &redis.FTExplainOptions{Dialect: \"2\"})","handlingStrategy":"fallback","validationCode":"// FTExplainCli cannot work; route to FTExplainWithArgs instead.\ncmd := client.FTExplainWithArgs(ctx, index, query, &redis.FTExplainOptions{Dialect: \"2\"})","typeGuard":null,"tryCatchPattern":"if err := client.FTExplainCli(ctx, index, query); err != nil {\n    if strings.Contains(err.Error(), \"not implemented\") {\n        // switch to FTExplainWithArgs\n    }\n}","preventionTips":["Never call FTExplainCli; it is permanently a stub.","Use FTExplain/FTExplainWithArgs for execution plans.","Search the codebase for FTExplainCli and remove all references."],"tags":["redisearch","ft-explain","not-implemented","deprecated","stub"],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}