examples/demo_shop/app/controllers/groups_controller.rb.
- State source:
Relation#group_by(field, limit: nil, missing_values: false)stores normalized state in@state[:grouping] - Compiler:
Relation#to_typesense_paramsemits Typesense params:group_by,group_limit,group_missing_values
| Call | Params |
|---|---|
.group_by(:author_id) | group_by: “author_id” |
.group_by(:author_id, limit: 2) | group_by: “author_id”, group_limit: 2 |
.group_by(:author_id, missing_values: true) | group_by: “author_id”, group_missing_values: true |
.group_by(:author_id, limit: 1, missing_values: true) | group_by: “author_id”, group_limit: 1, group_missing_values: true |