content/commands/ft.explain.md
Return the execution plan for a complex query
is index name. You must first create the index using [FT.CREATE]({{< relref "commands/ft.create/" >}}).
is query string, as if sent to FT.SEARCH`.
</details>is dialect version under which to execute the query. If not specified, the query executes under the default dialect version set during module initial loading or via [FT.CONFIG SET]({{< relref "commands/ft.config-set/" >}}) command.
{{% alert title="Notes" color="warning" %}}
+ on a term is an indication of stemming.redis-cli --raw to properly read line-breaks in the returned response.{{% /alert %}}
{{< highlight bash >}} $ redis-cli --raw
127.0.0.1:6379> FT.EXPLAIN rd "(foo bar)|(hello world) @date:[100 200]|@date:[500 +inf]" INTERSECT { UNION { INTERSECT { foo bar } INTERSECT { hello world } } UNION { NUMERIC {100.000000 <= x <= 200.000000} NUMERIC {500.000000 <= x <= inf} } } {{< / highlight >}}
</details>| Redis Software | Redis Cloud Flexible & Annual | Redis Cloud Free & Fixed | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:-----------------|:------| | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Supported</nobr></span> | |
{{< multitabs id="ft-explain-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
-tab-sep-
One of the following:
{{< /multitabs >}}
[FT.CREATE]({{< relref "commands/ft.create/" >}}) | [FT.SEARCH]({{< relref "commands/ft.search/" >}}) | [FT.CONFIG SET]({{< relref "commands/ft.config-set/" >}})
[RediSearch]({{< relref "/develop/ai/search-and-query/" >}})