Skip to content

Commit 035c03e

Browse files
authored
fix(specs): remove recommend query params overridden by the API (#6604)
1 parent 482bc1f commit 035c03e

3 files changed

Lines changed: 40 additions & 43 deletions

File tree

‎specs/recommend/common/schemas/IndexSettings.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ baseRecommendIndexSettings:
1010
properties:
1111
attributesToRetrieve:
1212
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/attributesToRetrieve'
13-
ranking:
14-
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/ranking'
1513
relevancyStrictness:
1614
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/relevancyStrictness'
1715
attributesToHighlight:
@@ -44,8 +42,6 @@ baseRecommendIndexSettings:
4442
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/queryLanguages'
4543
decompoundQuery:
4644
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/decompoundQuery'
47-
enableRules:
48-
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/enableRules'
4945
enablePersonalization:
5046
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/enablePersonalization'
5147
queryType:

‎specs/recommend/common/schemas/QueryParameters.yml‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@ recommendSearchParams:
55
- $ref: '#/baseRecommendSearchParams'
66
- $ref: '../../../common/schemas/SearchParams.yml#/searchParamsQuery'
77
- $ref: './IndexSettings.yml#/recommendIndexSettings'
8+
- type: object
9+
properties:
10+
enableRules:
11+
$ref: '../../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams/properties/enableRules'
812

913
fallbackParams:
1014
title: fallbackParameters
15+
description: Search parameters to use for a fallback request if there aren't enough recommendations.
1116
allOf:
12-
- $ref: './QueryParameters.yml#/recommendSearchParams'
13-
- type: object
14-
description: Search parameters to use for a fallback request if there aren't enough recommendations.
17+
- $ref: '#/baseRecommendSearchParams'
18+
- $ref: '../../../common/schemas/SearchParams.yml#/searchParamsQuery'
19+
- $ref: './IndexSettings.yml#/recommendIndexSettings'
1520

1621
baseRecommendSearchParams:
1722
type: object
@@ -21,8 +26,6 @@ baseRecommendSearchParams:
2126
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/similarQuery'
2227
filters:
2328
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/filters'
24-
facetFilters:
25-
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facetFilters'
2629
optionalFilters:
2730
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/optionalFilters'
2831
numericFilters:
@@ -71,5 +74,3 @@ baseRecommendSearchParams:
7174
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/analyticsTags'
7275
percentileComputation:
7376
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/percentileComputation'
74-
enableABTest:
75-
$ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/enableABTest'

‎tests/CTS/requests/recommend/getRecommendations.json‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@
139139
"maxRecommendations": 10,
140140
"queryParameters": {
141141
"query": "myQuery",
142-
"facetFilters": [
143-
"query"
142+
"optionalFilters": [
143+
"brand:apple"
144144
]
145145
},
146146
"fallbackParameters": {
147147
"query": "myQuery",
148-
"facetFilters": [
149-
"fallback"
148+
"optionalFilters": [
149+
"brand:samsung"
150150
]
151151
}
152152
}
@@ -165,14 +165,14 @@
165165
"maxRecommendations": 10,
166166
"queryParameters": {
167167
"query": "myQuery",
168-
"facetFilters": [
169-
"query"
168+
"optionalFilters": [
169+
"brand:apple"
170170
]
171171
},
172172
"fallbackParameters": {
173173
"query": "myQuery",
174-
"facetFilters": [
175-
"fallback"
174+
"optionalFilters": [
175+
"brand:samsung"
176176
]
177177
}
178178
}
@@ -222,14 +222,14 @@
222222
"facetValue": "myFacetValue",
223223
"queryParameters": {
224224
"query": "myQuery",
225-
"facetFilters": [
226-
"query"
225+
"optionalFilters": [
226+
"brand:apple"
227227
]
228228
},
229229
"fallbackParameters": {
230230
"query": "myQuery",
231-
"facetFilters": [
232-
"fallback"
231+
"optionalFilters": [
232+
"brand:samsung"
233233
]
234234
}
235235
}
@@ -249,14 +249,14 @@
249249
"facetValue": "myFacetValue",
250250
"queryParameters": {
251251
"query": "myQuery",
252-
"facetFilters": [
253-
"query"
252+
"optionalFilters": [
253+
"brand:apple"
254254
]
255255
},
256256
"fallbackParameters": {
257257
"query": "myQuery",
258-
"facetFilters": [
259-
"fallback"
258+
"optionalFilters": [
259+
"brand:samsung"
260260
]
261261
}
262262
}
@@ -315,14 +315,14 @@
315315
"maxRecommendations": 10,
316316
"queryParameters": {
317317
"query": "myQuery",
318-
"facetFilters": [
319-
"query1"
318+
"optionalFilters": [
319+
"brand:apple"
320320
]
321321
},
322322
"fallbackParameters": {
323323
"query": "myQuery",
324-
"facetFilters": [
325-
"fallback1"
324+
"optionalFilters": [
325+
"brand:samsung"
326326
]
327327
}
328328
},
@@ -334,14 +334,14 @@
334334
"maxRecommendations": 10,
335335
"queryParameters": {
336336
"query": "myQuery",
337-
"facetFilters": [
338-
"query2"
337+
"optionalFilters": [
338+
"brand:google"
339339
]
340340
},
341341
"fallbackParameters": {
342342
"query": "myQuery",
343-
"facetFilters": [
344-
"fallback2"
343+
"optionalFilters": [
344+
"brand:microsoft"
345345
]
346346
}
347347
}
@@ -360,14 +360,14 @@
360360
"maxRecommendations": 10,
361361
"queryParameters": {
362362
"query": "myQuery",
363-
"facetFilters": [
364-
"query1"
363+
"optionalFilters": [
364+
"brand:apple"
365365
]
366366
},
367367
"fallbackParameters": {
368368
"query": "myQuery",
369-
"facetFilters": [
370-
"fallback1"
369+
"optionalFilters": [
370+
"brand:samsung"
371371
]
372372
}
373373
},
@@ -379,14 +379,14 @@
379379
"maxRecommendations": 10,
380380
"queryParameters": {
381381
"query": "myQuery",
382-
"facetFilters": [
383-
"query2"
382+
"optionalFilters": [
383+
"brand:google"
384384
]
385385
},
386386
"fallbackParameters": {
387387
"query": "myQuery",
388-
"facetFilters": [
389-
"fallback2"
388+
"optionalFilters": [
389+
"brand:microsoft"
390390
]
391391
}
392392
}

0 commit comments

Comments
 (0)