Skip to content

Commit cce98d1

Browse files
committed
move sortingStrategy definition to root
1 parent c7f370f commit cce98d1

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

specs/composition/common/schemas/components/Composition.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,26 @@ composition:
1515
behavior:
1616
$ref: './CompositionBehavior.yml#/compositionBehavior'
1717
sortingStrategy:
18-
type: object
19-
description: |
20-
A mapping of sorting labels to the indices (or replicas) that implement those sorting rules.
18+
$ref: '#/sortingStrategy'
2119

22-
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.
23-
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 injection targeted index is replaced
24-
with the sorting strategy index it is mapped to.
25-
26-
Up to 20 sorting strategies can be defined.
27-
maxItems: 20
28-
additionalProperties:
29-
type: string
30-
example:
31-
'Price (asc)': 'products-low-to-high'
32-
'Price (desc)': 'products-high-to-low'
33-
3420
required:
3521
- objectID
3622
- behavior
3723
- name
24+
25+
sortingStrategy:
26+
type: object
27+
description: |
28+
A mapping of sorting labels to the indices (or replicas) that implement those sorting rules.
29+
30+
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.
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 injection targeted index is replaced
32+
with the sorting strategy index it is mapped to.
33+
34+
Up to 20 sorting strategies can be defined.
35+
maxItems: 20
36+
additionalProperties:
37+
type: string
38+
example:
39+
'Price (asc)': 'products-low-to-high'
40+
'Price (desc)': 'products-high-to-low'

0 commit comments

Comments
 (0)