Skip to content

Commit 403198a

Browse files
authored
Merge d3937bf into c38e91b
2 parents c38e91b + d3937bf commit 403198a

File tree

5 files changed

+241
-239
lines changed

5 files changed

+241
-239
lines changed

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

Lines changed: 1 addition & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -3,115 +3,6 @@ compositionBehavior:
33
additionalProperties: false
44
properties:
55
injection:
6-
title: injection
7-
type: object
8-
additionalProperties: false
9-
properties:
10-
main:
11-
title: main
12-
type: object
13-
additionalProperties: false
14-
properties:
15-
source:
16-
title: compositionSource
17-
type: object
18-
additionalProperties: false
19-
properties:
20-
search:
21-
title: compositionSourceSearch
22-
type: object
23-
additionalProperties: false
24-
properties:
25-
index:
26-
type: string
27-
description: Composition Main Index name.
28-
example: Products
29-
params:
30-
$ref: './Injection.yml#/mainInjectionQueryParameters'
31-
required:
32-
- index
33-
required:
34-
- search
35-
required:
36-
- source
37-
injectedItems:
38-
type: array
39-
description: list of injected items of the current Composition.
40-
minItems: 0
41-
maxItems: 2
42-
items:
43-
$ref: '#/injectedItem'
44-
deduplication:
45-
title: deduplication
46-
type: object
47-
additionalProperties: false
48-
description: Deduplication configures the methods used to resolve duplicate items between main search results and injected group results.
49-
properties:
50-
positioning:
51-
$ref: '#/dedupPositioning'
52-
required:
53-
- positioning
54-
required:
55-
- main
6+
$ref: './injection/Behaviour.yml#/InjectionBehaviour'
567
required:
578
- injection
58-
59-
injectedItem:
60-
type: object
61-
additionalProperties: false
62-
properties:
63-
key:
64-
type: string
65-
description: injected Item unique identifier.
66-
source:
67-
description: Search source to be used to inject items into result set.
68-
$ref: '#/injectedItemSource'
69-
position:
70-
type: integer
71-
minimum: 0
72-
maximum: 19
73-
length:
74-
type: integer
75-
minimum: 0
76-
maximum: 20
77-
metadata:
78-
title: injectedItemMetadata
79-
type: object
80-
description: Used to add metadata to the results of the injectedItem.
81-
properties:
82-
hits:
83-
title: injectedItemHitsMetadata
84-
type: object
85-
description: Adds the provided metadata to each injected hit via an `_extra` attribute.
86-
properties:
87-
addItemKey:
88-
type: boolean
89-
description: When true, the `_injectedItemKey` field is set in the `_extra` object of each affected hit.
90-
extra:
91-
type: object
92-
additionalProperties: true
93-
description: The user-defined key-value pairs that will be placed in the `_extra` field of each affected hit.
94-
required:
95-
- key
96-
- source
97-
- position
98-
- length
99-
100-
injectedItemSource:
101-
oneOf:
102-
- $ref: './InjectionSource.yml#/SearchSource'
103-
- $ref: './InjectionSource.yml#/ExternalSource'
104-
105-
dedupPositioning:
106-
type: string
107-
enum:
108-
- highest
109-
- highestInjected
110-
description: |
111-
Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results.
112-
Current configuration supports:
113-
- 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results.
114-
- 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher.
115-
If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main).
116-
example: highest
117-
default: highestInjected

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

Lines changed: 0 additions & 127 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
InjectionBehaviour:
2+
title: injection
3+
type: object
4+
additionalProperties: false
5+
properties:
6+
main:
7+
title: main
8+
type: object
9+
additionalProperties: false
10+
properties:
11+
source:
12+
title: compositionSource
13+
type: object
14+
additionalProperties: false
15+
properties:
16+
search:
17+
title: compositionSourceSearch
18+
type: object
19+
additionalProperties: false
20+
properties:
21+
index:
22+
type: string
23+
description: Composition Main Index name.
24+
example: Products
25+
params:
26+
$ref: './QueryParams.yml#/mainInjectionQueryParameters'
27+
required:
28+
- index
29+
required:
30+
- search
31+
required:
32+
- source
33+
injectedItems:
34+
type: array
35+
description: list of injected items of the current Composition.
36+
minItems: 0
37+
maxItems: 2
38+
items:
39+
$ref: '#/injectedItem'
40+
deduplication:
41+
title: deduplication
42+
type: object
43+
additionalProperties: false
44+
description: Deduplication configures the methods used to resolve duplicate items between main search results and injected group results.
45+
properties:
46+
positioning:
47+
$ref: '#/dedupPositioning'
48+
required:
49+
- positioning
50+
required:
51+
- main
52+
53+
injectedItem:
54+
type: object
55+
additionalProperties: false
56+
properties:
57+
key:
58+
type: string
59+
description: injected Item unique identifier.
60+
source:
61+
description: Search source to be used to inject items into result set.
62+
$ref: '#/injectedItemSource'
63+
position:
64+
type: integer
65+
minimum: 0
66+
maximum: 19
67+
length:
68+
type: integer
69+
minimum: 0
70+
maximum: 20
71+
metadata:
72+
title: injectedItemMetadata
73+
type: object
74+
description: Used to add metadata to the results of the injectedItem.
75+
properties:
76+
hits:
77+
title: injectedItemHitsMetadata
78+
type: object
79+
description: Adds the provided metadata to each injected hit via an `_extra` attribute.
80+
properties:
81+
addItemKey:
82+
type: boolean
83+
description: When true, the `_injectedItemKey` field is set in the `_extra` object of each affected hit.
84+
extra:
85+
type: object
86+
additionalProperties: true
87+
description: The user-defined key-value pairs that will be placed in the `_extra` field of each affected hit.
88+
required:
89+
- key
90+
- source
91+
- position
92+
- length
93+
94+
injectedItemSource:
95+
oneOf:
96+
- $ref: './Source.yml#/SearchSource'
97+
- $ref: './Source.yml#/ExternalSource'
98+
99+
dedupPositioning:
100+
type: string
101+
enum:
102+
- highest
103+
- highestInjected
104+
description: |
105+
Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results.
106+
Current configuration supports:
107+
- 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results.
108+
- 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher.
109+
If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main).
110+
example: highest
111+
default: highestInjected

0 commit comments

Comments
 (0)