ExAliyunOts.Search.row_count_sort

You're seeing just the function row_count_sort, go back to ExAliyunOts.Search module for more information.

Specs

row_count_sort(order()) :: %ExAliyunOts.Var.Search.RowCountSort{order: term()}

Use in group_by_field/3 scenario, in ascending/descending order of row(s) count.

Official document in Chinese | English

Example

In the following example, the returned results will be sorted in ascending order of the matched row(s):

import MyApp.TableStore

search "table", "index_name",
  search_query: [
    query: ...,
    group_bys: [
      group_by_field(
        "group_name",
        "type",
        sub_group_bys: [
          ...
        ],
        sort: [
          row_count_sort(:asc)
        ]
      )
    ]
  ]