Skip to content

Commit 49ade7d

Browse files
authored
add content for SCORER param (#1122)
1 parent 41f340c commit 49ade7d

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

content/commands/ft.aggregate/index.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ arguments:
139139
name: params
140140
optional: true
141141
type: block
142+
- name: scorer
143+
optional: true
144+
token: SCORER
145+
type: string
146+
- name: addscores
147+
optional: true
148+
token: ADDSCORES
149+
type: pure-token
142150
- name: dialect
143151
optional: true
144152
since: 2.4.3
@@ -173,7 +181,8 @@ syntax: "FT.AGGREGATE index query \n [VERBATIM] \n [LOAD count field [field ..
173181
\ ...]] ...]] \n [ SORTBY nargs [ property ASC | DESC [ property ASC | DESC ...]]\
174182
\ [MAX num] [WITHCOUNT] \n [ APPLY expression AS name [ APPLY expression AS name\
175183
\ ...]] \n [ LIMIT offset num] \n [FILTER filter] \n [ WITHCURSOR [COUNT read_size]\
176-
\ [MAXIDLE idle_time]] \n [ PARAMS nargs name value [ name value ...]] \n [ADDSCORES] \n [DIALECT\
184+
\ [MAXIDLE idle_time]] \n [ PARAMS nargs name value [ name value ...]] \n [SCORER scorer]\n
185+
\ [ADDSCORES] \n [DIALECT\
177186
\ dialect]\n"
178187
syntax_fmt: "FT.AGGREGATE index query [VERBATIM] [LOAD\_count field [field ...]]\n\
179188
\ [TIMEOUT\_timeout] [LOAD *] [GROUPBY\_nargs property [property ...]\n [REDUCE\_\
@@ -183,15 +192,15 @@ syntax_fmt: "FT.AGGREGATE index query [VERBATIM] [LOAD\_count field [field ...]]
183192
name] ...]] ...]]\n [SORTBY\_nargs [property <ASC | DESC> [property <ASC | DESC>\
184193
\ ...]]\n [MAX\_num]] [APPLY\_expression AS\_name [APPLY\_expression AS\_name\n\
185194
\ ...]] [LIMIT offset num] [FILTER\_filter] [WITHCURSOR\n [COUNT\_read_size] [MAXIDLE\_\
186-
idle_time]] [PARAMS nargs name value\n [name value ...]]\n [ADDSCORES]\n [DIALECT\_dialect]"
195+
idle_time]] [PARAMS nargs name value\n [name value ...]]\n [SCORER scorer]\n [ADDSCORES]\n [DIALECT\_dialect]"
187196
syntax_str: "query [VERBATIM] [LOAD\_count field [field ...]] [TIMEOUT\_timeout] [LOAD\
188197
\ *] [GROUPBY\_nargs property [property ...] [REDUCE\_function nargs arg [arg ...]\
189198
\ [AS\_name] [REDUCE\_function nargs arg [arg ...] [AS\_name] ...]] [GROUPBY\_nargs\
190199
\ property [property ...] [REDUCE\_function nargs arg [arg ...] [AS\_name] [REDUCE\_\
191200
function nargs arg [arg ...] [AS\_name] ...]] ...]] [SORTBY\_nargs [property <ASC\
192201
\ | DESC> [property <ASC | DESC> ...]] [MAX\_num]] [APPLY\_expression AS\_name [APPLY\_\
193202
expression AS\_name ...]] [LIMIT offset num] [FILTER\_filter] [WITHCURSOR [COUNT\_\
194-
read_size] [MAXIDLE\_idle_time]] [PARAMS nargs name value [name value ...]] [ADDSCORES] [DIALECT\_\
203+
read_size] [MAXIDLE\_idle_time]] [PARAMS nargs name value [name value ...]] [SCORER scorer] [ADDSCORES] [DIALECT\_\
195204
dialect]"
196205
title: FT.AGGREGATE
197206
---
@@ -316,6 +325,12 @@ defines one or more value parameters. Each parameter has a name and a value.
316325
You can reference parameters in the `query` by a `$`, followed by the parameter name, for example, `$user`. Each such reference in the search query to a parameter name is substituted by the corresponding parameter value. For example, with parameter definition `PARAMS 4 lon 29.69465 lat 34.95126`, the expression `@loc:[$lon $lat 10 km]` is evaluated to `@loc:[29.69465 34.95126 10 km]`. You cannot reference parameters in the query string where concrete values are not allowed, such as in field names, for example, `@loc`. To use `PARAMS`, set `DIALECT` to `2` or greater than `2`.
317326
</details>
318327

328+
<details open>
329+
<summary><code>SCORER {scorer}</code></summary>
330+
331+
uses a [built-in]({{< relref "/develop/interact/search-and-query/advanced-concepts/scoring" >}}) or a [user-provided]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}) scoring function.
332+
</details>
333+
319334
<details open>
320335
<summary><code>ADDSCORES</code></summary>
321336

0 commit comments

Comments
 (0)