You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0a3cbbb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: specs/composition/common/params/Composition.yml
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -137,5 +137,10 @@ sortBy:
137
137
In addition to "sortingStrategy", this parameter is also used to apply a matching Composition Rule that contains a condition defined to trigger on "sortBy", see Composition Rules.
138
138
139
139
If no value is provided or an invalid value, no sorting strategy is applied.
140
+
141
+
For `multifeed` compositions, every feed inherits the root "sortBy" unless the feed sets its own "sortBy" in `feeds.<id>.params`.
142
+
An empty string disables sorting for that feed.
143
+
The response reports an invalid value in the `errors` field. This includes a value whose index is unrelated to the feed's indices.
144
+
Composition Rules still match on the root "sortBy".
Copy file name to clipboardExpand all lines: specs/composition/common/schemas/components/Composition.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ composition:
25
25
sortingStrategy:
26
26
type: object
27
27
description: |
28
-
A mapping of sorting labels to the indices (or replicas) that implement those sorting rules. The sorting indices MUST be related to the associated main targeted index in the composition.
28
+
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.
29
29
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.
30
30
31
31
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
Copy file name to clipboardExpand all lines: specs/composition/paths/compositions/updateSortingStrategy.yml
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,9 @@ post:
8
8
description: |
9
9
Updates the "sortingStrategy" field of an existing composition.
10
10
This endpoint lets you create a new sorting strategy mapping or replace the configured one.
11
-
The provided sorting indices must be associated indices or replicas of the main targeted index.
12
-
13
-
This endpoint can't validate whether the sort index is related to the composition's main index.
14
-
Validation fails at runtime if the index you updated isn't related.
11
+
This endpoint only validates that the sorting indices exist.
12
+
At runtime, the API ignores a sorting index that is unrelated to the targeted indices.
13
+
The response reports it in the `errors` field.
15
14
16
15
The update is applied to the specified composition within the current Algolia application and returns a taskID that can be used to track the operation’s completion.
0 commit comments