Set or update the "sortingStrategy" configuration for an existing composition
Updates the “sortingStrategy” field of an existing composition. This endpoint lets you create a new sorting strategy mapping or replace the configured one. This endpoint only validates that the sorting indices exist. At runtime, the API ignores a sorting index that is unrelated to the targeted indices. The response reports it in the errors field.
editSettingsAuthorizations
Path Parameters
Body
A mapping of sorting labels to the indices (or replicas) that implement those sorting rules. When the composition is run, the API ignores a sorting index that is unrelated to the targeted indices. The response reports it in the errors field.
Each key is the label your frontend sends at runtime (for example, "Price (asc)"), and each value is the name of the index that should be queried when that label is selected.
When a request includes a "sortBy" parameter, the platform looks up the corresponding index in this mapping and uses it to execute the query. The main targeted index is replaced with the sorting strategy index it is mapped to.
Up to 20 sorting strategies can be defined.
Response
OK
Unique identifier of a task.
A successful API response means that a task was added to a queue.
It might not run immediately.
You can check the task's progress with the task operation and this task ID.
1514562690001