Skip to content

Commit 1744717

Browse files
committed
fix(specs): optionalFilters ammendment
1 parent 2774d75 commit 1744717

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

specs/common/schemas/SearchParams.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,22 @@ searchParams:
22
oneOf:
33
- $ref: '#/searchParamsString'
44
- $ref: '#/searchParamsObject'
5-
65
searchParamsObject:
76
title: Search parameters as object
87
description: Each parameter value, including the `query` must not be larger than 512 bytes.
98
allOf:
109
- $ref: '#/baseSearchParams'
1110
- $ref: '../../common/schemas/IndexSettings.yml#/indexSettingsAsSearchParams'
12-
1311
baseSearchParams:
1412
allOf:
1513
- $ref: '#/searchParamsQuery'
1614
- $ref: '#/baseSearchParamsWithoutQuery'
17-
1815
searchParamsQuery:
1916
type: object
2017
additionalProperties: false
2118
properties:
2219
query:
2320
$ref: '#/query'
24-
2521
baseSearchParamsWithoutQuery:
2622
type: object
2723
additionalProperties: false
@@ -218,7 +214,6 @@ baseSearchParamsWithoutQuery:
218214
default: true
219215
x-categories:
220216
- Advanced
221-
222217
searchParamsString:
223218
type: object
224219
title: Search parameters as query string.
@@ -229,13 +224,11 @@ searchParamsString:
229224
properties:
230225
params:
231226
$ref: '#/paramsAsString'
232-
233227
paramsAsString:
234228
description: Search parameters as a URL-encoded query string.
235229
example: 'hitsPerPage=2&getRankingInfo=1'
236230
type: string
237231
default: ''
238-
239232
userToken:
240233
type: string
241234
description: |
@@ -246,22 +239,19 @@ userToken:
246239
example: test-user-123
247240
x-categories:
248241
- Personalization
249-
250242
query:
251243
type: string
252244
description: Search query.
253245
default: ''
254246
x-categories:
255247
- Search
256-
257248
page:
258249
type: integer
259250
description: Page of search results to retrieve.
260251
default: 0
261252
minimum: 0
262253
x-categories:
263254
- Pagination
264-
265255
aroundRadius:
266256
description: |
267257
Maximum radius for a search around a central location.
@@ -276,7 +266,6 @@ aroundRadius:
276266
- $ref: '#/aroundRadiusAll'
277267
x-categories:
278268
- Geo-Search
279-
280269
aroundPrecision:
281270
description: |
282271
Precision of a coordinate-based search in meters to group results with similar distances.
@@ -293,7 +282,6 @@ aroundPrecision:
293282
- $ref: '#/aroundPrecisionFromValue'
294283
x-categories:
295284
- Geo-Search
296-
297285
aroundPrecisionFromValue:
298286
title: range objects
299287
type: array
@@ -309,13 +297,11 @@ aroundPrecisionFromValue:
309297
value:
310298
type: integer
311299
description: Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
312-
313300
aroundRadiusAll:
314301
title: all
315302
type: string
316303
description: Return all records with a valid `_geoloc` attribute. Don't filter by distance.
317304
enum: [all]
318-
319305
aroundLatLng:
320306
type: string
321307
description: |
@@ -328,20 +314,17 @@ aroundLatLng:
328314
default: ''
329315
x-categories:
330316
- Geo-Search
331-
332317
aroundLatLngViaIP:
333318
type: boolean
334319
description: Whether to obtain the coordinates from the request's IP address.
335320
default: false
336321
x-categories:
337322
- Geo-Search
338-
339323
insideBoundingBox:
340324
oneOf:
341325
- type: string
342326
- type: 'null'
343327
- $ref: '#/insideBoundingBoxArray'
344-
345328
insideBoundingBoxArray:
346329
type: array
347330
items:
@@ -363,7 +346,6 @@ insideBoundingBoxArray:
363346
- [40.9234, 2.1185, 38.6430, 1.9916]
364347
x-categories:
365348
- Geo-Search
366-
367349
insidePolygon:
368350
type: array
369351
items:
@@ -385,7 +367,6 @@ insidePolygon:
385367
- [40.9234, 2.1185, 38.6430, 1.9916, 39.2587, 2.0104]
386368
x-categories:
387369
- Geo-Search
388-
389370
filters:
390371
type: string
391372
description: |
@@ -415,7 +396,6 @@ filters:
415396
example: '(category:Book OR category:Ebook) AND _tags:published'
416397
x-categories:
417398
- Filtering
418-
419399
facetFilters:
420400
description: |
421401
Filter the search by facet values, so that only records with the same facet values are retrieved.
@@ -436,7 +416,6 @@ facetFilters:
436416
- type: string
437417
x-categories:
438418
- Filtering
439-
440419
tagFilters:
441420
description: |
442421
Filter the search by values of the special `_tags` attribute.
@@ -454,7 +433,6 @@ tagFilters:
454433
- type: string
455434
x-categories:
456435
- Filtering
457-
458436
numericFilters:
459437
description: |
460438
Filter by numeric facets.
@@ -473,7 +451,6 @@ numericFilters:
473451
- type: string
474452
x-categories:
475453
- Filtering
476-
477454
optionalFilters:
478455
description: |
479456
Filters to promote or demote records in the search results.
@@ -484,8 +461,8 @@ optionalFilters:
484461
485462
- Optional filters don't work on virtual replicas.
486463
- Optional filters are applied _after_ sort-by attributes.
464+
- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)).
487465
- Optional filters don't work with numeric attributes.
488-
489466
example: ['category:Book', 'author:John Doe']
490467
oneOf:
491468
- type: array

0 commit comments

Comments
 (0)