ExAliyunOts.Search.group_key_sort
You're seeing just the function
group_key_sort
, go back to ExAliyunOts.Search module for more information.
Specs
Use in group_by_field/3
scenario, in ascending/descending order of field literal.
Official document in Chinese | English
Example
In the following example, the returned results will be sorted in descending order of the "type"
field:
import MyApp.TableStore
search "table", "index_name",
search_query: [
query: ...,
group_bys: [
group_by_field(
"group_name",
"type",
sub_group_bys: [
...
],
sort: [
group_key_sort(:desc)
]
)
]
]