content/commands/ft.explaincli.md
Return the execution plan for a complex query but formatted for easier reading without using redis-cli --raw
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="Note" color="warning" %}}
In the returned response, a + on a term is an indication of stemming.
{{% /alert %}}
</details>{{< highlight bash >}} $ redis-cli
127.0.0.1:6379> FT.EXPLAINCLI rd "(foo bar)|(hello world) @date:[100 200]|@date:[500 +inf]"
INTERSECT {
UNION {
foo
+foo(expanded)
}
UNION {
bar
+bar(expanded)
}
}
INTERSECT {
UNION {
hello
+hello(expanded)
}
UNION {
world
+world(expanded)
}
}
NUMERIC {100.000000 <= @date <= 200.000000}
NUMERIC {500.000000 <= @date <= 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-explaincli-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/" >}})