Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion content/commands/ft.aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ syntax: "FT.AGGREGATE index query \n [VERBATIM] \n [LOAD count field [field ..
\ \n [TIMEOUT timeout] \n [GROUPBY nargs property [property ...] [REDUCE function\
\ nargs arg [arg ...] [AS name] [REDUCE function nargs arg [arg ...] [AS name]\
\ ...]] ...]] \n [SORTBY nargs [property ASC | DESC [property ASC | DESC ...]]\
\ [MAX num] [WITHCOUNT] \n [APPLY expression AS name [APPLY expression AS name\
\ [MAX num] [WITHCOUNT | WITHOUTCOUNT]] \n [APPLY expression AS name [APPLY expression AS name\
\ ...]] \n [LIMIT offset num] \n [FILTER filter] \n [WITHCURSOR [COUNT read_size]\
\ [MAXIDLE idle_time]] \n [PARAMS nargs name value [name value ...]] \n [SCORER scorer]\n
\ [ADDSCORES] \n [DIALECT\
Expand Down Expand Up @@ -282,6 +282,8 @@ Attributes needed for `SORTBY` should be stored as `SORTABLE` to be available wi

**Counts behavior**: optional `WITHCOUNT` argument returns accurate counts for the query results with sorting. This operation processes all results in order to get an accurate count, being less performant than the optimized option (default behavior on `DIALECT 4`)

You can also use `WITHOUTCOUNT` in place of `DIALECT 4` when used with either `FT.SEARCH` or `FT.AGGREGATE`.
</details>

<details open>
<summary><code>APPLY {expr} AS {name}</code></summary>
Expand Down
6 changes: 3 additions & 3 deletions content/commands/ft.search.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ syntax: "FT.SEARCH index query \n [NOCONTENT] \n [VERBATIM] \n [NOSTOPWORDS]
\ [ FIELDS count field [field ...]] [ TAGS open close]] \n [SLOP slop] \n [TIMEOUT\
\ timeout] \n [INORDER] \n [LANGUAGE language] \n [EXPANDER expander] \n [SCORER\
\ scorer] \n [EXPLAINSCORE] \n [PAYLOAD payload] \n [SORTBY sortby [ ASC | DESC]\
\ [WITHCOUNT]] \n [LIMIT offset num] \n [PARAMS nargs name value [ name value\
\ [WITHCOUNT | WITHOUTCOUNT]] \n [LIMIT offset num] \n [PARAMS nargs name value [ name value\
\ ...]] \n [DIALECT dialect]\n"
syntax_fmt: "FT.SEARCH index query [NOCONTENT] [VERBATIM] [NOSTOPWORDS]\n [WITHSCORES]\
\ [WITHPAYLOADS] [WITHSORTKEYS] [FILTER\_numeric_field\n min max [FILTER\_numeric_field\
Expand Down Expand Up @@ -483,9 +483,9 @@ orders the results by the value of this attribute. This applies to both text and
- Hybrid - applied when there is a `SORTBY` clause over a numeric field and another non-numeric filter. Some results will get filtered, and the initial range may not be large enough. The iterator is then rewinding with the following ranges, and an additional iteration takes place to collect the `LIMIT` requested results.
- No optimization - If there is a sort by score or by non-numeric field, there is no other option but to retrieve all results and compare their values.

**Counts behavior**: optional`WITHCOUNT`argument returns accurate counts for the query results with sorting. This operation processes all results in order to get an accurate count, being less performant than the optimized option (default behavior on `DIALECT 4`)

**Counts behavior**: optional `WITHCOUNT` argument returns accurate counts for the query results with sorting. This operation processes all results in order to get an accurate count, being less performant than the optimized option (default behavior on `DIALECT 4`)

You can also use `WITHOUTCOUNT` in place of `DIALECT 4` when used with either `FT.SEARCH` or `FT.AGGREGATE`.
</details>

<details open>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ Dialect version 4 will improve performance in four different scenarios:
1. **Hybrid** - applied when there is a `SORTBY` on a numeric field in addition to another non-numeric filter. It could be the case that some results will get filtered, leaving too small a range to satisfy any specified `LIMIT`. In such cases, the iterator then is re-wound and additional iterations occur to collect result up to the requested `LIMIT`.
1. **No optimization** - If there is a sort by score or by a non-numeric field, there is no other option but to retrieve all results and compare their values to the search parameters.

You can also use `WITHOUTCOUNT` in place of `DIALECT 4` when used with either FT.SEARCH or FT.AGGREGATE.

## Use `FT.EXPLAINCLI` to compare dialects

The [`FT.EXPLAINCLI`]({{< relref "commands/ft.explaincli/" >}}) command is a powerful tool that provides a window into the inner workings of your queries. It's like a roadmap that details your query's journey from start to finish.
Expand Down