go-redis/redis · error
FTExplainCli is not implemented
Error message
FTExplainCli is not implemented
What it means
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.
Source
Thrown at search_commands.go:1741
// 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.
// For more information, please refer to the Redis documentation:
// [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/)
func (c cmdable) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd {
args := []interface{}{"FT.EXPLAIN", index, query}
if options.Dialect != "" {
args = append(args, "DIALECT", options.Dialect)
} else {
args = append(args, "DIALECT", 2)
}
cmd := NewStringCmd(ctx, args...)
_ = c(ctx, cmd)
return cmd
}
// FTExplainCli - Returns the execution plan for a complex query. [Not Implemented]
// For more information, see https://redis.io/commands/ft.explaincli/
func (c cmdable) FTExplainCli(ctx context.Context, key, path string) error {
return fmt.Errorf("FTExplainCli is not implemented")
}
// parseFTAttributeFromMap parses an FTAttribute from a RESP3 map format
func parseFTAttributeFromMap(attrMap map[interface{}]interface{}) FTAttribute {
att := FTAttribute{}
for k, v := range attrMap {
key := internal.ToLower(internal.ToString(k))
switch key {
case "attribute":
att.Attribute = internal.ToString(v)
case "identifier":
att.Identifier = internal.ToString(v)
case "type":
att.Type = internal.ToString(v)
case "weight":
att.Weight = internal.ToFloat(v)
case "phonetic":
att.PhoneticMatcher = internal.ToString(v)View on GitHub (pinned to 36d97525cd)
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.
Example fix
// before
client.FTExplainCli(ctx, "myidx", q)
// after
client.FTExplainWithArgs(ctx, "myidx", q, &redis.FTExplainOptions{Dialect: "2"}) Defensive patterns
Strategy: fallback
Validate before calling
// FTExplainCli cannot work; route to FTExplainWithArgs instead.
cmd := client.FTExplainWithArgs(ctx, index, query, &redis.FTExplainOptions{Dialect: "2"}) Try / catch
if err := client.FTExplainCli(ctx, index, query); err != nil {
if strings.Contains(err.Error(), "not implemented") {
// switch to FTExplainWithArgs
}
} Prevention
- Never call FTExplainCli; it is permanently a stub.
- Use FTExplain/FTExplainWithArgs for execution plans.
- Search the codebase for FTExplainCli and remove all references.
When it happens
Trigger: Calling client.FTExplainCli(ctx, key, path). Any call returns the error immediately without touching the connection.
Common situations: Porting code from an older client/docs that referenced FT.EXPLAINCLI, or autocomplete suggesting FTExplainCli next to FTExplain.
Related errors
- not implemented
- GeoRadius does not support Store or StoreDist
- GeoRadiusByMember does not support Store or StoreDist
- redis: invalid map key %#v
- redis: unexpected response %#v
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/e07e89199b86aa8f.json.
Report an issue: GitHub.