sorting

This block is part of the query group and was last modified in core v10.4.28.

Field Selection Required

This block relies on a field that you select to perform its data actions. You must manually select the field you want to use in your flow using the field selector modal. To access the modal, click the white button on the block.

Connection Type

This block connects from a query type block. Make sure to connect this block to the appropriate left-hand side connection.

sorting v10.4.28

Sorts the results on the given field and ordering.

In pins 2
  • A-Z / 1-9 / ASC required
    condition
  • Z-A / 9-1 / DESC required
    condition
Out pins 1
  • query
    query

Emits a bool_sort fragment ordering results by the bound field: {"bool_sort": {field: {"order": ..., "missing": ...}}}; value-typed fields sort on the .keyword sub-field. Order is "asc" ONLY when the asc pin is strictly boolean true : every other value, including a wired desc pin, yields "desc" (the desc pin is never read). Documents missing the field get "missing": false for condition fields, 0 for number/date fields, and "_first"/"_last" otherwise (by truthiness of asc).

A typical wiring for sorting: true feeds the asc pin; the query out pin feeds multiple.

Studio canvas example for the sorting block: typical wiring for sorting.

Commonly used with

In production blueprints, this block is most often wired together with:

  • true: feeds into this block. Gives the condition true hard-coded.
  • multiple: this block feeds into it.
  • search: this block feeds into it. searches in the given storage based on a query.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v10.4.28.


Back to query Return to the main group to view all sub-groups Back to query: misc. Return to the group to view all blocks within this group