Skip to content
For AI agents: the complete documentation index is available at llms.txt; this page is also available as Markdown at index.md.

Field Sort Clause

The Field Sort Clause sorts search results by the value of one of the content items' fields.

Search results of the provided content type are sorted in field value order. Results of the query that don't belong to the content type are ranked lower.

Arguments

  • typeIdentifier - string representing the identifier of the content type to which the field belongs
  • fieldIdentifier - string representing the identifier of the field to sort by - (optional) sorting direction, either ascending (default) or descending

Example

You can use this Sort Clause over the REST API, in the SortClauses element of the payload of the POST /views request:

1
2
3
4
5
6
7
8
9
"Query": {
    "SortClauses": {
        "Field": {
            "contentTypeIdentifier": "article",
            "fieldDefinitionIdentifier": "title",
            "direction": "ascending"
        }
    }
}