@graphcommerce/algolia-products 9.0.0-canary.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/Config.graphqls +54 -0
  3. package/README.md +79 -0
  4. package/algolia-spec.yaml +4418 -0
  5. package/graphql/CustomerGroupId.graphql +3 -0
  6. package/graphql/GetAlgoliaSettings.graphql +122 -0
  7. package/graphql/ProductListItems_Algolia.graphql +3 -0
  8. package/hooks/useAlgoliaIndexName.ts +5 -0
  9. package/hooks/useAlgoliaQueryContext.ts +11 -0
  10. package/index.ts +8 -0
  11. package/link/customerGroupIdLink.ts +20 -0
  12. package/mesh/algoliaFacetsToAggregations.ts +209 -0
  13. package/mesh/algoliaHitToMagentoProduct.ts +191 -0
  14. package/mesh/getAlgoliaSettings.ts +21 -0
  15. package/mesh/getAttributeList.ts +31 -0
  16. package/mesh/getGroupId.ts +7 -0
  17. package/mesh/getIndexName.ts +11 -0
  18. package/mesh/getSearchResults.ts +35 -0
  19. package/mesh/getSearchResultsInput.ts +30 -0
  20. package/mesh/getSearchSuggestions.ts +27 -0
  21. package/mesh/getSearchSuggestionsInput.ts +21 -0
  22. package/mesh/getStoreConfig.ts +33 -0
  23. package/mesh/productFilterInputToAlgoliafacetFiltersInput.ts +81 -0
  24. package/mesh/resolvers.ts +126 -0
  25. package/mesh/sortOptions.ts +76 -0
  26. package/mesh/utils.ts +3 -0
  27. package/next-env.d.ts +4 -0
  28. package/package.json +32 -0
  29. package/plugins/GraphQLProviderAlgoliaCustomerGroupId.tsx +14 -0
  30. package/plugins/ProductListItemsBaseAlgolia.tsx +21 -0
  31. package/plugins/magentoProductApplyAlgoliaEngine.ts +25 -0
  32. package/plugins/magentoSearchApplyAlgoliaEngine.ts +26 -0
  33. package/plugins/meshConfigAlgolia.ts +66 -0
  34. package/schema/AlgoliaSchema.graphqls +60 -0
  35. package/schema/CustomerAlgoliaGroupId.graphqls +9 -0
  36. package/scripts/base-schema-filter.mts +45 -0
  37. package/scripts/generate-spec.mts +69 -0
  38. package/tsconfig.json +5 -0
  39. package/utils/applyCategoryEngineVariable.ts +11 -0
  40. package/utils/applyEngineVariable.ts +11 -0
@@ -0,0 +1,4418 @@
1
+ openapi: 3.0.2
2
+ info:
3
+ title: Search API
4
+ description: >
5
+ The Algolia Search API lets you search, configure, and mange your indices and records.
6
+
7
+
8
+ ## Client libraries
9
+
10
+
11
+ Use Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps.
12
+
13
+ The official API clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/).
14
+
15
+
16
+ See: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/)
17
+
18
+
19
+ ## Base URLs
20
+
21
+
22
+ The base URLs for requests to the Search API are:
23
+
24
+
25
+ - `https://{APPLICATION_ID}.algolia.net`
26
+
27
+ - `https://{APPLICATION_ID}-dsn.algolia.net`.
28
+ If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra),
29
+ this ensures that requests are sent to servers closest to users.
30
+
31
+ Both URLs provide high availability by distributing requests with load balancing.
32
+
33
+
34
+ **All requests must use HTTPS.**
35
+
36
+
37
+ ## Retry strategy
38
+
39
+
40
+ To guarantee a high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks:
41
+
42
+
43
+ - `https://{APPLICATION_ID}-1.algolianet.com`
44
+
45
+ - `https://{APPLICATION_ID}-2.algolianet.com`
46
+
47
+ - `https://{APPLICATION_ID}-3.algolianet.com`
48
+
49
+
50
+ These URLs use a different DNS provider than the primary URLs.
51
+
52
+ You should randomize this list to ensure an even load across the three servers.
53
+
54
+
55
+ All Algolia API clients implement this retry strategy.
56
+
57
+
58
+ ## Authentication
59
+
60
+
61
+ To authenticate your API requests, add these headers:
62
+
63
+
64
+ - `x-algolia-application-id`. Your Algolia application ID.
65
+
66
+ - `x-algolia-api-key`. An API key with the necessary permissions to make the request.
67
+ The required access control list (ACL) to make a request is listed in each endpoint's reference.
68
+
69
+ You can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).
70
+
71
+
72
+ ## Request format
73
+
74
+
75
+ Depending on the endpoint, request bodies are either JSON objects or arrays of JSON objects,
76
+
77
+
78
+ ## Parameters
79
+
80
+
81
+ Parameters are passed as query parameters for GET and DELETE requests,
82
+
83
+ and in the request body for POST and PUT requests.
84
+
85
+
86
+ Query parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).
87
+
88
+ Non-ASCII characters must be UTF-8 encoded.
89
+
90
+ Plus characters (`+`) are interpreted as spaces.
91
+
92
+ Arrays as query parameters must be one of:
93
+
94
+
95
+ - A comma-separated string: `attributesToRetrieve=title,description`
96
+
97
+ - A URL-encoded JSON array: `attributesToRetrieve=%5B%22title%22,%22description%22%D`
98
+
99
+
100
+ ## Response status and errors
101
+
102
+
103
+ The Search API returns JSON responses.
104
+
105
+ Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.
106
+
107
+
108
+ Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.
109
+
110
+ Error responses have a `message` property with more information.
111
+
112
+
113
+ ## Version
114
+
115
+
116
+ The current version of the Search API is version 1, as indicated by the `/1/` in each endpoint's URL.
117
+
118
+ version: 1.0.0
119
+ servers:
120
+ - url: https://{appId}.algolia.net
121
+ variables:
122
+ appId:
123
+ default: myAppId
124
+ - url: https://{appId}-1.algolianet.com
125
+ variables:
126
+ appId:
127
+ default: myAppId
128
+ - url: https://{appId}-2.algolianet.com
129
+ variables:
130
+ appId:
131
+ default: myAppId
132
+ - url: https://{appId}-3.algolianet.com
133
+ variables:
134
+ appId:
135
+ default: myAppId
136
+ - url: https://{appId}-dsn.algolia.net
137
+ variables:
138
+ appId:
139
+ default: myAppId
140
+ security:
141
+ - appId: []
142
+ apiKey: []
143
+ tags:
144
+ - name: Advanced
145
+ description: Query your logs.
146
+ - name: Api Keys
147
+ x-displayName: API keys
148
+ description: >
149
+ Manage your API keys.
150
+
151
+
152
+ API requests must be authenticated with an API key.
153
+
154
+ API keys can have permissions (access control lists, ACL) and restrictions.
155
+
156
+ externalDocs:
157
+ url: https://www.algolia.com/doc/guides/security/api-keys/
158
+ description: |
159
+ Related guide: API keys.
160
+ - name: Clusters
161
+ description: |
162
+ Multi-cluster operations.
163
+
164
+ Algolia no longer offers multi-cluster management.
165
+ externalDocs:
166
+ url: >-
167
+ https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/
168
+
169
+ description: |
170
+ Related guide: Multi-cluster management.
171
+ - name: Dictionaries
172
+ description: >
173
+ Manage your dictionaries.
174
+
175
+
176
+ Customize language-specific settings, such as stop words, plurals, or word segmentation.
177
+
178
+
179
+ Dictionaries are application-wide.
180
+
181
+ externalDocs:
182
+ url: >-
183
+ https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/
184
+
185
+ description: |
186
+ Related guide: Natural languages.
187
+ - name: Indices
188
+ description: >
189
+ Manage your indices and index settings.
190
+
191
+
192
+ Indices are copies of your data that are stored on Algolia's servers.
193
+
194
+ They're optimal data structures for fast search and are made up of records and settings.
195
+
196
+ externalDocs:
197
+ url: >-
198
+ https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/
199
+
200
+ description: |
201
+ Related guide: Manage your indices.
202
+ - name: Records
203
+ description: >
204
+ Add, update, and delete records from your indices.
205
+
206
+
207
+ Records are individual items in your index.
208
+
209
+ When they match a search query, they're returned as search results, in the order determined by your ranking.
210
+
211
+ Records are schemaless JSON objects.
212
+
213
+ externalDocs:
214
+ url: >-
215
+ https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/
216
+
217
+ description: |
218
+ Related guide: Prepare your records.
219
+ - name: Rules
220
+ description: >
221
+ Create, update, delete, and search for rules.
222
+
223
+
224
+ Rules are _if-then_ statements that you can use to curate search results.
225
+
226
+ Rules have _conditions_ which can trigger _consequences_.
227
+
228
+ Consequences are changes to the search results, such as changing the order of search results, or boosting a facet.
229
+
230
+ This can be useful for tuning specific queries or for merchandising.
231
+
232
+ externalDocs:
233
+ url: >-
234
+ https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/
235
+
236
+ description: |
237
+ Related guide: Rules.
238
+ - name: Search
239
+ description: Search one or more indices for matching records or facet values.
240
+ - name: Synonyms
241
+ description: |
242
+ Create, update, delete, and search for synonyms.
243
+
244
+ Synonyms are terms that the search engine should consider equal.
245
+ externalDocs:
246
+ url: >-
247
+ https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/
248
+
249
+ description: |
250
+ Related guide: Synonyms.
251
+ - name: Vaults
252
+ description: >-
253
+ Algolia Vault lets you restrict access to your clusters to specific IP addresses and provides disk-level encryption at rest.
254
+
255
+ externalDocs:
256
+ url: https://www.algolia.com/doc/guides/security/algolia-vault/
257
+ description: |
258
+ Related guide: Algolia Vault.
259
+ - name: _model_index_settings
260
+ x-displayName: Index settings
261
+ description: |
262
+ <SchemaDefinition schemaRef="#/components/schemas/indexSettings" />.
263
+ paths:
264
+ /1/indexes/{indexName}/query:
265
+ post:
266
+ tags:
267
+ - search
268
+ operationId: searchSingleIndex
269
+ x-use-read-transporter: true
270
+ x-cacheable: true
271
+ x-acl:
272
+ - search
273
+ summary: Search an index
274
+ description: >
275
+ Searches a single index and return matching search results (_hits_).
276
+
277
+
278
+ This method lets you retrieve up to 1,000 hits.
279
+
280
+ If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
281
+
282
+ parameters:
283
+ - $ref: '#/components/parameters/IndexName'
284
+ requestBody:
285
+ content:
286
+ application/json:
287
+ schema:
288
+ $ref: '#/components/schemas/searchParams'
289
+ responses:
290
+ '200':
291
+ description: OK
292
+ content:
293
+ application/json:
294
+ schema:
295
+ $ref: '#/components/schemas/searchResponse'
296
+ '400':
297
+ $ref: '#/components/responses/BadRequest'
298
+ '402':
299
+ $ref: '#/components/responses/FeatureNotEnabled'
300
+ '403':
301
+ $ref: '#/components/responses/MethodNotAllowed'
302
+ '404':
303
+ $ref: '#/components/responses/IndexNotFound'
304
+ /1/indexes/{indexName}/facets/{facetName}/query:
305
+ post:
306
+ tags:
307
+ - search
308
+ operationId: searchForFacetValues
309
+ x-use-read-transporter: true
310
+ x-cacheable: true
311
+ x-acl:
312
+ - search
313
+ summary: Search for facet values
314
+ description: >
315
+ Searches for values of a specified facet attribute.
316
+
317
+
318
+ - By default, facet values are sorted by decreasing count.
319
+ You can adjust this with the `sortFacetValueBy` parameter.
320
+ - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**.
321
+
322
+ parameters:
323
+ - $ref: '#/components/parameters/IndexName'
324
+ - name: facetName
325
+ description: >
326
+ Facet attribute in which to search for values.
327
+
328
+
329
+ This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
330
+
331
+ in: path
332
+ required: true
333
+ schema:
334
+ type: string
335
+ requestBody:
336
+ content:
337
+ application/json:
338
+ schema:
339
+ title: searchForFacetValuesRequest
340
+ type: object
341
+ additionalProperties: false
342
+ properties:
343
+ params:
344
+ $ref: '#/components/schemas/paramsAsString'
345
+ facetQuery:
346
+ $ref: '#/components/schemas/facetQuery'
347
+ maxFacetHits:
348
+ $ref: '#/components/schemas/maxFacetHits'
349
+ responses:
350
+ '200':
351
+ description: OK
352
+ content:
353
+ application/json:
354
+ schema:
355
+ $ref: '#/components/schemas/searchForFacetValuesResponse'
356
+ '400':
357
+ $ref: '#/components/responses/BadRequest'
358
+ '402':
359
+ $ref: '#/components/responses/FeatureNotEnabled'
360
+ '403':
361
+ $ref: '#/components/responses/MethodNotAllowed'
362
+ '404':
363
+ $ref: '#/components/responses/IndexNotFound'
364
+ /1/indexes/{indexName}/settings:
365
+ get:
366
+ tags:
367
+ - search
368
+ operationId: getSettings
369
+ x-acl:
370
+ - search
371
+ description: Retrieves an object with non-null index settings.
372
+ summary: Retrieve index settings
373
+ parameters:
374
+ - $ref: '#/components/parameters/IndexName'
375
+ responses:
376
+ '200':
377
+ description: OK
378
+ content:
379
+ application/json:
380
+ schema:
381
+ $ref: '#/components/schemas/settingsResponse'
382
+ '400':
383
+ $ref: '#/components/responses/BadRequest'
384
+ '402':
385
+ $ref: '#/components/responses/FeatureNotEnabled'
386
+ '403':
387
+ $ref: '#/components/responses/MethodNotAllowed'
388
+ '404':
389
+ $ref: '#/components/responses/IndexNotFound'
390
+ components:
391
+ securitySchemes:
392
+ appId:
393
+ type: apiKey
394
+ in: header
395
+ name: x-algolia-application-id
396
+ description: Your Algolia application ID.
397
+ apiKey:
398
+ type: apiKey
399
+ in: header
400
+ name: x-algolia-api-key
401
+ description: >
402
+ Your Algolia API key with the necessary permissions to make the request.
403
+
404
+ Permissions are controlled through access control lists (ACL) and access restrictions.
405
+
406
+ The required ACL to make a request is listed in each endpoint's reference.
407
+
408
+ schemas:
409
+ attributeToUpdate:
410
+ x-keep-model: true
411
+ deprecated: true
412
+ oneOf:
413
+ - type: string
414
+ - $ref: '#/components/schemas/builtInOperation'
415
+ ErrorBase:
416
+ description: Error.
417
+ type: object
418
+ x-keep-model: true
419
+ additionalProperties: true
420
+ properties:
421
+ message:
422
+ type: string
423
+ example: Invalid Application-Id or API-Key
424
+ paramsAsString:
425
+ description: Search parameters as a URL-encoded query string.
426
+ example: hitsPerPage=2&getRankingInfo=1
427
+ type: string
428
+ searchParamsString:
429
+ type: object
430
+ title: Search parameters as query string.
431
+ description: Search parameters as query string.
432
+ additionalProperties: false
433
+ x-discriminator-fields:
434
+ - params
435
+ properties:
436
+ params:
437
+ $ref: '#/components/schemas/paramsAsString'
438
+ query:
439
+ type: string
440
+ description: Search query.
441
+ x-categories:
442
+ - Search
443
+ searchParamsQuery:
444
+ type: object
445
+ additionalProperties: false
446
+ properties:
447
+ query:
448
+ $ref: '#/components/schemas/query'
449
+ filters:
450
+ type: string
451
+ description: >
452
+ Filter expression to only include items that match the filter criteria in the response.
453
+
454
+
455
+ You can use these filter expressions:
456
+
457
+
458
+ - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.
459
+
460
+ - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive).
461
+
462
+ - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value.
463
+
464
+ - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive).
465
+
466
+ - **Boolean filters.** `<facet>: true | false`.
467
+
468
+
469
+ You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:
470
+
471
+
472
+ - You can only combine filters of the same type with `OR`.
473
+ **Not supported:** `facet:value OR num > 3`.
474
+ - You can't use `NOT` with combinations of filters.
475
+ **Not supported:** `NOT(facet:value OR facet:value)`
476
+ - You can't combine conjunctions (`AND`) with `OR`.
477
+ **Not supported:** `facet:value OR (facet:value AND facet:value)`
478
+
479
+ Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.
480
+
481
+ If a facet attribute is an array, the filter matches if it matches at least one element of the array.
482
+
483
+
484
+ For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
485
+
486
+ example: (category:Book OR category:Ebook) AND _tags:published
487
+ x-categories:
488
+ - Filtering
489
+ facetFilters:
490
+ description: >
491
+ Filter the search by facet values, so that only records with the same facet values are retrieved.
492
+
493
+
494
+ **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
495
+
496
+
497
+ - `[filter1, filter2]` is interpreted as `filter1 AND filter2`.
498
+
499
+ - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.
500
+
501
+ - `facet:-value` is interpreted as `NOT facet:value`.
502
+
503
+
504
+ While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:
505
+
506
+ `facet:\-value`.
507
+
508
+ x-categories:
509
+ - Filtering
510
+ type: object
511
+ optionalFilters:
512
+ description: >
513
+ Filters to promote or demote records in the search results.
514
+
515
+
516
+ Optional filters work like facet filters, but they don't exclude records from the search results.
517
+
518
+ Records that match the optional filter rank before records that don't match.
519
+
520
+ If you're using a negative filter `facet:-value`, matching records rank after records that don't match.
521
+
522
+
523
+ - Optional filters don't work on virtual replicas.
524
+
525
+ - Optional filters are applied _after_ sort-by attributes.
526
+
527
+ - Optional filters don't work with numeric attributes.
528
+
529
+ example:
530
+ - category:Book
531
+ - author:John Doe
532
+ oneOf:
533
+ - type: array
534
+ items:
535
+ $ref: '#/components/schemas/optionalFilters'
536
+ - type: string
537
+ x-categories:
538
+ - Filtering
539
+ numericFilters:
540
+ description: >
541
+ Filter by numeric facets.
542
+
543
+
544
+ **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
545
+
546
+
547
+ You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals.
548
+
549
+ You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries.
550
+
551
+ The same combination rules apply as for `facetFilters`.
552
+
553
+ example:
554
+ - - inStock = 1
555
+ - deliveryDate < 1441755506
556
+ - price < 1000
557
+ oneOf:
558
+ - type: array
559
+ items:
560
+ $ref: '#/components/schemas/numericFilters'
561
+ - type: string
562
+ x-categories:
563
+ - Filtering
564
+ tagFilters:
565
+ description: >
566
+ Filter the search by values of the special `_tags` attribute.
567
+
568
+
569
+ **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**
570
+
571
+
572
+ Different from regular facets, `_tags` can only be used for filtering (including or excluding records).
573
+
574
+ You won't get a facet count.
575
+
576
+ The same combination and escaping rules apply as for `facetFilters`.
577
+
578
+ example:
579
+ - - Book
580
+ - Movie
581
+ - SciFi
582
+ oneOf:
583
+ - type: array
584
+ items:
585
+ $ref: '#/components/schemas/tagFilters'
586
+ - type: string
587
+ x-categories:
588
+ - Filtering
589
+ page:
590
+ type: integer
591
+ description: Page of search results to retrieve.
592
+ minimum: 0
593
+ x-categories:
594
+ - Pagination
595
+ aroundLatLng:
596
+ type: string
597
+ description: >
598
+ Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.
599
+
600
+
601
+ Only records included within circle around this central location are included in the results.
602
+
603
+ The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.
604
+
605
+ This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
606
+
607
+ example: 40.71,-74.01
608
+ x-categories:
609
+ - Geo-Search
610
+ aroundLatLngViaIP:
611
+ type: boolean
612
+ description: Whether to obtain the coordinates from the request's IP address.
613
+ x-categories:
614
+ - Geo-Search
615
+ aroundRadiusAll:
616
+ title: all
617
+ type: string
618
+ description: >-
619
+ Return all records with a valid `_geoloc` attribute. Don't filter by distance.
620
+
621
+ enum:
622
+ - all
623
+ aroundRadius:
624
+ description: >
625
+ Maximum radius for a search around a central location.
626
+
627
+
628
+ This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.
629
+
630
+ By default, the search radius is determined automatically from the density of hits around the central location.
631
+
632
+ The search radius is small if there are many hits close to the central coordinates.
633
+
634
+ oneOf:
635
+ - type: integer
636
+ minimum: 1
637
+ description: Maximum search radius around a central location in meters.
638
+ - $ref: '#/components/schemas/aroundRadiusAll'
639
+ x-categories:
640
+ - Geo-Search
641
+ aroundPrecisionFromValue:
642
+ title: range objects
643
+ type: array
644
+ items:
645
+ title: range
646
+ type: object
647
+ description: >-
648
+ Range object with lower and upper values in meters to define custom ranges.
649
+
650
+ properties:
651
+ from:
652
+ type: integer
653
+ description: >-
654
+ Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
655
+
656
+ example: 20
657
+ value:
658
+ type: integer
659
+ description: >-
660
+ Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
661
+
662
+ aroundPrecision:
663
+ description: >
664
+ Precision of a coordinate-based search in meters to group results with similar distances.
665
+
666
+
667
+ The Geo ranking criterion considers all matches within the same range of distances to be equal.
668
+
669
+ oneOf:
670
+ - type: integer
671
+ default: 10
672
+ description: >
673
+ Distance in meters to group results by similar distances.
674
+
675
+
676
+ For example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance,
677
+
678
+ as are records between 100 and 199 meters.
679
+
680
+ - $ref: '#/components/schemas/aroundPrecisionFromValue'
681
+ x-categories:
682
+ - Geo-Search
683
+ insideBoundingBox:
684
+ type: array
685
+ items:
686
+ type: array
687
+ minItems: 4
688
+ maxItems: 4
689
+ items:
690
+ type: number
691
+ format: double
692
+ description: >
693
+ Coordinates for a rectangular area in which to search.
694
+
695
+
696
+ Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:
697
+
698
+ `[p1 lat, p1 long, p2 lat, p2 long]`.
699
+
700
+ Provide multiple bounding boxes as nested arrays.
701
+
702
+ For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
703
+
704
+ example:
705
+ - - 47.3165
706
+ - 4.9665
707
+ - 47.3424
708
+ - 5.0201
709
+ - - 40.9234
710
+ - 2.1185
711
+ - 38.643
712
+ - 1.9916
713
+ x-categories:
714
+ - Geo-Search
715
+ insidePolygon:
716
+ type: array
717
+ items:
718
+ type: array
719
+ minItems: 6
720
+ maxItems: 20000
721
+ items:
722
+ type: number
723
+ format: double
724
+ description: >
725
+ Coordinates of a polygon in which to search.
726
+
727
+
728
+ Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.
729
+
730
+ Provide multiple polygons as nested arrays.
731
+
732
+ For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
733
+
734
+ This parameter is ignored if you also specify `insideBoundingBox`.
735
+
736
+ example:
737
+ - - 47.3165
738
+ - 4.9665
739
+ - 47.3424
740
+ - 5.0201
741
+ - 47.32
742
+ - 4.9
743
+ - - 40.9234
744
+ - 2.1185
745
+ - 38.643
746
+ - 1.9916
747
+ - 39.2587
748
+ - 2.0104
749
+ x-categories:
750
+ - Geo-Search
751
+ supportedLanguage:
752
+ type: string
753
+ description: ISO code for a supported language.
754
+ enum:
755
+ - af
756
+ - ar
757
+ - az
758
+ - bg
759
+ - bn
760
+ - ca
761
+ - cs
762
+ - cy
763
+ - da
764
+ - de
765
+ - el
766
+ - en
767
+ - eo
768
+ - es
769
+ - et
770
+ - eu
771
+ - fa
772
+ - fi
773
+ - fo
774
+ - fr
775
+ - ga
776
+ - gl
777
+ - he
778
+ - hi
779
+ - hu
780
+ - hy
781
+ - id
782
+ - is
783
+ - it
784
+ - ja
785
+ - ka
786
+ - kk
787
+ - ko
788
+ - ku
789
+ - ky
790
+ - lt
791
+ - lv
792
+ - mi
793
+ - mn
794
+ - mr
795
+ - ms
796
+ - mt
797
+ - nb
798
+ - nl
799
+ - 'no'
800
+ - ns
801
+ - pl
802
+ - ps
803
+ - pt
804
+ - pt-br
805
+ - qu
806
+ - ro
807
+ - ru
808
+ - sk
809
+ - sq
810
+ - sv
811
+ - sw
812
+ - ta
813
+ - te
814
+ - th
815
+ - tl
816
+ - tn
817
+ - tr
818
+ - tt
819
+ - uk
820
+ - ur
821
+ - uz
822
+ - zh
823
+ userToken:
824
+ type: string
825
+ description: >
826
+ Unique pseudonymous or anonymous user identifier.
827
+
828
+
829
+ This helps with analytics and click and conversion events.
830
+
831
+ For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
832
+
833
+ example: test-user-123
834
+ x-categories:
835
+ - Personalization
836
+ baseSearchParamsWithoutQuery:
837
+ type: object
838
+ additionalProperties: false
839
+ properties:
840
+ similarQuery:
841
+ type: string
842
+ description: >
843
+ Keywords to be used instead of the search query to conduct a more broader search.
844
+
845
+
846
+ Using the `similarQuery` parameter changes other settings:
847
+
848
+
849
+ - `queryType` is set to `prefixNone`.
850
+
851
+ - `removeStopWords` is set to true.
852
+
853
+ - `words` is set as the first ranking criterion.
854
+
855
+ - All remaining words are treated as `optionalWords`.
856
+
857
+
858
+ Since the `similarQuery` is supposed to do a broad search, they usually return many results.
859
+
860
+ Combine it with `filters` to narrow down the list of results.
861
+
862
+ example: comedy drama crime Macy Buscemi
863
+ x-categories:
864
+ - Search
865
+ filters:
866
+ $ref: '#/components/schemas/filters'
867
+ facetFilters:
868
+ $ref: '#/components/schemas/facetFilters'
869
+ optionalFilters:
870
+ $ref: '#/components/schemas/optionalFilters'
871
+ numericFilters:
872
+ $ref: '#/components/schemas/numericFilters'
873
+ tagFilters:
874
+ $ref: '#/components/schemas/tagFilters'
875
+ sumOrFiltersScores:
876
+ type: boolean
877
+ description: >
878
+ Whether to sum all filter scores.
879
+
880
+
881
+ If true, all filter scores are summed.
882
+
883
+ Otherwise, the maximum filter score is kept.
884
+
885
+ For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
886
+
887
+ x-categories:
888
+ - Filtering
889
+ restrictSearchableAttributes:
890
+ type: array
891
+ items:
892
+ type: string
893
+ example:
894
+ - title
895
+ - author
896
+ description: |
897
+ Restricts a search to a subset of your searchable attributes.
898
+ Attribute names are case-sensitive.
899
+ x-categories:
900
+ - Filtering
901
+ facets:
902
+ type: array
903
+ items:
904
+ type: string
905
+ description: >
906
+ Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.
907
+
908
+
909
+ To retrieve all facets, use the wildcard character `*`.
910
+
911
+ For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
912
+
913
+ default: []
914
+ x-categories:
915
+ - Faceting
916
+ facetingAfterDistinct:
917
+ type: boolean
918
+ description: >
919
+ Whether faceting should be applied after deduplication with `distinct`.
920
+
921
+
922
+ This leads to accurate facet counts when using faceting in combination with `distinct`.
923
+
924
+ It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,
925
+
926
+ as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
927
+
928
+ x-categories:
929
+ - Faceting
930
+ page:
931
+ $ref: '#/components/schemas/page'
932
+ offset:
933
+ type: integer
934
+ description: Position of the first hit to retrieve.
935
+ x-categories:
936
+ - Pagination
937
+ length:
938
+ type: integer
939
+ description: Number of hits to retrieve (used in combination with `offset`).
940
+ minimum: 0
941
+ maximum: 1000
942
+ x-categories:
943
+ - Pagination
944
+ aroundLatLng:
945
+ $ref: '#/components/schemas/aroundLatLng'
946
+ aroundLatLngViaIP:
947
+ $ref: '#/components/schemas/aroundLatLngViaIP'
948
+ aroundRadius:
949
+ $ref: '#/components/schemas/aroundRadius'
950
+ aroundPrecision:
951
+ $ref: '#/components/schemas/aroundPrecision'
952
+ minimumAroundRadius:
953
+ type: integer
954
+ description: >-
955
+ Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
956
+
957
+ minimum: 1
958
+ x-categories:
959
+ - Geo-Search
960
+ insideBoundingBox:
961
+ $ref: '#/components/schemas/insideBoundingBox'
962
+ insidePolygon:
963
+ $ref: '#/components/schemas/insidePolygon'
964
+ naturalLanguages:
965
+ type: array
966
+ items:
967
+ $ref: '#/components/schemas/supportedLanguage'
968
+ description: >
969
+ ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):
970
+
971
+
972
+ - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.
973
+
974
+ - Sets `removeWordsIfNoResults` to `allOptional`.
975
+
976
+ - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
977
+
978
+ x-categories:
979
+ - Languages
980
+ ruleContexts:
981
+ type: array
982
+ items:
983
+ type: string
984
+ description: >
985
+ Assigns a rule context to the search query.
986
+
987
+
988
+ [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
989
+
990
+ example:
991
+ - mobile
992
+ x-categories:
993
+ - Rules
994
+ personalizationImpact:
995
+ type: integer
996
+ description: >
997
+ Impact that Personalization should have on this search.
998
+
999
+
1000
+ The higher this value is, the more Personalization determines the ranking compared to other factors.
1001
+
1002
+ For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
1003
+
1004
+ minimum: 0
1005
+ maximum: 100
1006
+ x-categories:
1007
+ - Personalization
1008
+ userToken:
1009
+ $ref: '#/components/schemas/userToken'
1010
+ getRankingInfo:
1011
+ type: boolean
1012
+ description: >-
1013
+ Whether the search response should include detailed ranking information.
1014
+
1015
+ x-categories:
1016
+ - Advanced
1017
+ synonyms:
1018
+ type: boolean
1019
+ description: Whether to take into account an index's synonyms for this search.
1020
+ x-categories:
1021
+ - Advanced
1022
+ clickAnalytics:
1023
+ type: boolean
1024
+ description: >
1025
+ Whether to include a `queryID` attribute in the response.
1026
+
1027
+
1028
+ The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
1029
+
1030
+ x-categories:
1031
+ - Analytics
1032
+ analytics:
1033
+ type: boolean
1034
+ description: Whether this search will be included in Analytics.
1035
+ x-categories:
1036
+ - Analytics
1037
+ analyticsTags:
1038
+ type: array
1039
+ items:
1040
+ type: string
1041
+ description: >-
1042
+ Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
1043
+
1044
+ x-categories:
1045
+ - Analytics
1046
+ percentileComputation:
1047
+ type: boolean
1048
+ description: >-
1049
+ Whether to include this search when calculating processing-time percentiles.
1050
+
1051
+ x-categories:
1052
+ - Advanced
1053
+ enableABTest:
1054
+ type: boolean
1055
+ description: Whether to enable A/B testing for this search.
1056
+ x-categories:
1057
+ - Advanced
1058
+ baseSearchParams:
1059
+ allOf:
1060
+ - $ref: '#/components/schemas/searchParamsQuery'
1061
+ - $ref: '#/components/schemas/baseSearchParamsWithoutQuery'
1062
+ hitsPerPage:
1063
+ type: integer
1064
+ description: Number of hits per page.
1065
+ minimum: 1
1066
+ maximum: 1000
1067
+ x-categories:
1068
+ - Pagination
1069
+ typoToleranceEnum:
1070
+ type: string
1071
+ title: typo tolerance
1072
+ description: |
1073
+ - `min`. Return matches with the lowest number of typos.
1074
+ For example, if you have matches without typos, only include those.
1075
+ But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
1076
+ - `strict`. Return matches with the two lowest numbers of typos.
1077
+ With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
1078
+ enum:
1079
+ - min
1080
+ - strict
1081
+ typoTolerance:
1082
+ description: >
1083
+ Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.
1084
+
1085
+
1086
+ If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
1087
+
1088
+ oneOf:
1089
+ - type: boolean
1090
+ default: true
1091
+ description: >-
1092
+ Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches.
1093
+
1094
+ - $ref: '#/components/schemas/typoToleranceEnum'
1095
+ x-categories:
1096
+ - Typos
1097
+ booleanString:
1098
+ type: string
1099
+ enum:
1100
+ - 'true'
1101
+ - 'false'
1102
+ ignorePlurals:
1103
+ description: |
1104
+ Treat singular, plurals, and other forms of declensions as equivalent.
1105
+ You should only use this feature for the languages used in your index.
1106
+ example:
1107
+ - ca
1108
+ - es
1109
+ oneOf:
1110
+ - type: array
1111
+ description: |
1112
+ ISO code for languages for which this feature should be active.
1113
+ This overrides languages you set with `queryLanguages`.
1114
+ items:
1115
+ $ref: '#/components/schemas/supportedLanguage'
1116
+ - $ref: '#/components/schemas/booleanString'
1117
+ - type: boolean
1118
+ description: >
1119
+ If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty.
1120
+
1121
+ If false, singulars, plurals, and other declensions won't be considered equivalent.
1122
+
1123
+ default: false
1124
+ x-categories:
1125
+ - Languages
1126
+ removeStopWords:
1127
+ description: >
1128
+ Removes stop words from the search query.
1129
+
1130
+
1131
+ Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.
1132
+
1133
+ In English, "the", "a", or "and" are stop words.
1134
+
1135
+
1136
+ You should only use this feature for the languages used in your index.
1137
+
1138
+ example:
1139
+ - ca
1140
+ - es
1141
+ oneOf:
1142
+ - type: array
1143
+ description: >-
1144
+ ISO code for languages for which stop words should be removed. This overrides languages you set in `queryLanguges`.
1145
+
1146
+ items:
1147
+ $ref: '#/components/schemas/supportedLanguage'
1148
+ - type: boolean
1149
+ default: false
1150
+ description: >
1151
+ If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.
1152
+
1153
+ If false, stop words are not removed.
1154
+
1155
+ x-categories:
1156
+ - Languages
1157
+ queryType:
1158
+ type: string
1159
+ enum:
1160
+ - prefixLast
1161
+ - prefixAll
1162
+ - prefixNone
1163
+ description: >
1164
+ Determines if and how query words are interpreted as prefixes.
1165
+
1166
+
1167
+ By default, only the last query word is treated as prefix (`prefixLast`).
1168
+
1169
+ To turn off prefix search, use `prefixNone`.
1170
+
1171
+ Avoid `prefixAll`, which treats all query words as prefixes.
1172
+
1173
+ This might lead to counterintuitive results and makes your search slower.
1174
+
1175
+
1176
+ For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
1177
+
1178
+ x-categories:
1179
+ - Query strategy
1180
+ removeWordsIfNoResults:
1181
+ type: string
1182
+ enum:
1183
+ - none
1184
+ - lastWords
1185
+ - firstWords
1186
+ - allOptional
1187
+ example: firstWords
1188
+ description: >
1189
+ Strategy for removing words from the query when it doesn't return any results.
1190
+
1191
+ This helps to avoid returning empty search results.
1192
+
1193
+
1194
+ - `none`.
1195
+ No words are removed when a query doesn't return results.
1196
+
1197
+ - `lastWords`.
1198
+ Treat the last (then second to last, then third to last) word as optional,
1199
+ until there are results or at most 5 words have been removed.
1200
+
1201
+ - `firstWords`.
1202
+ Treat the first (then second, then third) word as optional,
1203
+ until there are results or at most 5 words have been removed.
1204
+
1205
+ - `allOptional`.
1206
+ Treat all words as optional.
1207
+
1208
+ For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
1209
+
1210
+ x-categories:
1211
+ - Query strategy
1212
+ mode:
1213
+ type: string
1214
+ enum:
1215
+ - neuralSearch
1216
+ - keywordSearch
1217
+ description: >
1218
+ Search mode the index will use to query for results.
1219
+
1220
+
1221
+ This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
1222
+
1223
+ x-categories:
1224
+ - Query strategy
1225
+ semanticSearch:
1226
+ type: object
1227
+ description: |
1228
+ Settings for the semantic search part of NeuralSearch.
1229
+ Only used when `mode` is `neuralSearch`.
1230
+ properties:
1231
+ eventSources:
1232
+ oneOf:
1233
+ - type: array
1234
+ description: |
1235
+ Indices from which to collect click and conversion events.
1236
+
1237
+ If null, the current index and all its replicas are used.
1238
+ items:
1239
+ type: string
1240
+ - type: 'null'
1241
+ exactOnSingleWordQuery:
1242
+ type: string
1243
+ enum:
1244
+ - attribute
1245
+ - none
1246
+ - word
1247
+ description: >
1248
+ Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.
1249
+
1250
+
1251
+ - `attribute`.
1252
+ The Exact ranking criterion is 1 if the query word and attribute value are the same.
1253
+ For example, a search for "road" will match the value "road", but not "road trip".
1254
+
1255
+ - `none`.
1256
+ The Exact ranking criterion is ignored on single-word searches.
1257
+
1258
+ - `word`.
1259
+ The Exact ranking criterion is 1 if the query word is found in the attribute value.
1260
+ The query word must have at least 3 characters and must not be a stop word.
1261
+ Only exact matches will be highlighted,
1262
+ partial and prefix matches won't.
1263
+
1264
+ x-categories:
1265
+ - Query strategy
1266
+ alternativesAsExact:
1267
+ type: string
1268
+ enum:
1269
+ - ignorePlurals
1270
+ - singleWordSynonym
1271
+ - multiWordsSynonym
1272
+ x-categories:
1273
+ - Query strategy
1274
+ advancedSyntaxFeatures:
1275
+ type: string
1276
+ enum:
1277
+ - exactPhrase
1278
+ - excludeWords
1279
+ x-categories:
1280
+ - Query strategy
1281
+ distinct:
1282
+ description: >
1283
+ Determines how many records of a group are included in the search results.
1284
+
1285
+
1286
+ Records with the same value for the `attributeForDistinct` attribute are considered a group.
1287
+
1288
+ The `distinct` setting controls how many members of the group are returned.
1289
+
1290
+ This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).
1291
+
1292
+
1293
+ The `distinct` setting is ignored if `attributeForDistinct` is not set.
1294
+
1295
+ example: 1
1296
+ oneOf:
1297
+ - type: boolean
1298
+ description: >-
1299
+ Whether deduplication is turned on. If true, only one member of a group is shown in the search results.
1300
+
1301
+ - type: integer
1302
+ description: >
1303
+ Number of members of a group of records to include in the search results.
1304
+
1305
+
1306
+ - Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/).
1307
+ The number of hits won't be correct and faceting won't work as expected.
1308
+ - With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups.
1309
+ For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned.
1310
+ Likewise, the `nbHits` response attribute contains the number of returned groups.
1311
+
1312
+ minimum: 0
1313
+ maximum: 4
1314
+ default: 0
1315
+ x-categories:
1316
+ - Advanced
1317
+ maxFacetHits:
1318
+ type: integer
1319
+ description: >-
1320
+ Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1321
+
1322
+ maximum: 100
1323
+ x-categories:
1324
+ - Advanced
1325
+ order:
1326
+ description: >
1327
+ Explicit order of facets or facet values.
1328
+
1329
+
1330
+ This setting lets you always show specific facets or facet values at the top of the list.
1331
+
1332
+ type: array
1333
+ items:
1334
+ type: string
1335
+ facets:
1336
+ description: Order of facet names.
1337
+ type: object
1338
+ additionalProperties: false
1339
+ properties:
1340
+ order:
1341
+ $ref: '#/components/schemas/order'
1342
+ sortRemainingBy:
1343
+ description: >
1344
+ Order of facet values that aren't explicitly positioned with the `order` setting.
1345
+
1346
+
1347
+ - `count`.
1348
+ Order remaining facet values by decreasing count.
1349
+ The count is the number of matching records containing this facet value.
1350
+
1351
+ - `alpha`.
1352
+ Sort facet values alphabetically.
1353
+
1354
+ - `hidden`.
1355
+ Don't show facet values that aren't explicitly positioned.
1356
+
1357
+ type: string
1358
+ enum:
1359
+ - count
1360
+ - alpha
1361
+ - hidden
1362
+ hide:
1363
+ description: Hide facet values.
1364
+ type: array
1365
+ items:
1366
+ type: string
1367
+ value:
1368
+ type: object
1369
+ additionalProperties: false
1370
+ properties:
1371
+ order:
1372
+ $ref: '#/components/schemas/order'
1373
+ sortRemainingBy:
1374
+ $ref: '#/components/schemas/sortRemainingBy'
1375
+ hide:
1376
+ $ref: '#/components/schemas/hide'
1377
+ values:
1378
+ description: Order of facet values. One object for each facet.
1379
+ type: object
1380
+ additionalProperties:
1381
+ x-additionalPropertiesName: facet
1382
+ $ref: '#/components/schemas/value'
1383
+ facetOrdering:
1384
+ description: Order of facet names and facet values in your UI.
1385
+ type: object
1386
+ additionalProperties: false
1387
+ properties:
1388
+ facets:
1389
+ $ref: '#/components/schemas/facets'
1390
+ values:
1391
+ $ref: '#/components/schemas/values'
1392
+ redirectURL:
1393
+ description: The redirect rule container.
1394
+ type: object
1395
+ additionalProperties: false
1396
+ properties:
1397
+ url:
1398
+ type: string
1399
+ renderingContent:
1400
+ description: >
1401
+ Extra data that can be used in the search UI.
1402
+
1403
+
1404
+ You can use this to control aspects of your search UI, such as, the order of facet names and values
1405
+
1406
+ without changing your frontend code.
1407
+
1408
+ type: object
1409
+ additionalProperties: false
1410
+ properties:
1411
+ facetOrdering:
1412
+ $ref: '#/components/schemas/facetOrdering'
1413
+ redirect:
1414
+ $ref: '#/components/schemas/redirectURL'
1415
+ x-categories:
1416
+ - Advanced
1417
+ reRankingApplyFilter:
1418
+ description: >
1419
+ Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
1420
+
1421
+ oneOf:
1422
+ - type: array
1423
+ items:
1424
+ $ref: '#/components/schemas/reRankingApplyFilter'
1425
+ - type: string
1426
+ x-categories:
1427
+ - Filtering
1428
+ indexSettingsAsSearchParams:
1429
+ type: object
1430
+ additionalProperties: false
1431
+ properties:
1432
+ attributesToRetrieve:
1433
+ type: array
1434
+ items:
1435
+ type: string
1436
+ example:
1437
+ - author
1438
+ - title
1439
+ - content
1440
+ description: >
1441
+ Attributes to include in the API response.
1442
+
1443
+
1444
+ To reduce the size of your response, you can retrieve only some of the attributes.
1445
+
1446
+ Attribute names are case-sensitive.
1447
+
1448
+
1449
+ - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.
1450
+
1451
+ - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `["*", "-ATTRIBUTE"]`.
1452
+
1453
+ - The `objectID` attribute is always included.
1454
+
1455
+ x-categories:
1456
+ - Attributes
1457
+ ranking:
1458
+ type: array
1459
+ items:
1460
+ type: string
1461
+ description: >
1462
+ Determines the order in which Algolia returns your results.
1463
+
1464
+
1465
+ By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
1466
+
1467
+ The tie-breaking algorithm sequentially applies each criterion in the order they're specified.
1468
+
1469
+ If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/),
1470
+
1471
+ you put the sorting attribute at the top of the list.
1472
+
1473
+
1474
+ **Modifiers**
1475
+
1476
+
1477
+ - `asc("ATTRIBUTE")`.
1478
+ Sort the index by the values of an attribute, in ascending order.
1479
+ - `desc("ATTRIBUTE")`.
1480
+ Sort the index by the values of an attribute, in descending order.
1481
+
1482
+ Before you modify the default setting,
1483
+
1484
+ you should test your changes in the dashboard,
1485
+
1486
+ and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
1487
+
1488
+ x-categories:
1489
+ - Ranking
1490
+ customRanking:
1491
+ type: array
1492
+ items:
1493
+ type: string
1494
+ example:
1495
+ - desc(popularity)
1496
+ - asc(price)
1497
+ description: >
1498
+ Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).
1499
+
1500
+ Attribute names are case-sensitive.
1501
+
1502
+
1503
+ The custom ranking attributes decide which items are shown first if the other ranking criteria are equal.
1504
+
1505
+
1506
+ Records with missing values for your selected custom ranking attributes are always sorted last.
1507
+
1508
+ Boolean attributes are sorted based on their alphabetical order.
1509
+
1510
+
1511
+ **Modifiers**
1512
+
1513
+
1514
+ - `asc("ATTRIBUTE")`.
1515
+ Sort the index by the values of an attribute, in ascending order.
1516
+
1517
+ - `desc("ATTRIBUTE")`.
1518
+ Sort the index by the values of an attribute, in descending order.
1519
+
1520
+ If you use two or more custom ranking attributes,
1521
+
1522
+ [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes,
1523
+
1524
+ or the other attributes will never be applied.
1525
+
1526
+ x-categories:
1527
+ - Ranking
1528
+ relevancyStrictness:
1529
+ type: integer
1530
+ example: 90
1531
+ description: >
1532
+ Relevancy threshold below which less relevant results aren't included in the results.
1533
+
1534
+
1535
+ You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).
1536
+
1537
+ Use this setting to strike a balance between the relevance and number of returned results.
1538
+
1539
+ x-categories:
1540
+ - Ranking
1541
+ attributesToHighlight:
1542
+ type: array
1543
+ items:
1544
+ type: string
1545
+ example:
1546
+ - author
1547
+ - title
1548
+ - conten
1549
+ - content
1550
+ description: >
1551
+ Attributes to highlight.
1552
+
1553
+
1554
+ By default, all searchable attributes are highlighted.
1555
+
1556
+ Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.
1557
+
1558
+ Attribute names are case-sensitive.
1559
+
1560
+
1561
+ With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.
1562
+
1563
+ You can use this to visually highlight matching parts of a search query in your UI.
1564
+
1565
+
1566
+ For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).
1567
+
1568
+ x-categories:
1569
+ - Highlighting and Snippeting
1570
+ attributesToSnippet:
1571
+ type: array
1572
+ items:
1573
+ type: string
1574
+ example:
1575
+ - content:80
1576
+ - description
1577
+ description: >
1578
+ Attributes for which to enable snippets.
1579
+
1580
+ Attribute names are case-sensitive.
1581
+
1582
+
1583
+ Snippets provide additional context to matched words.
1584
+
1585
+ If you enable snippets, they include 10 words, including the matched word.
1586
+
1587
+ The matched word will also be wrapped by HTML tags for highlighting.
1588
+
1589
+ You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,
1590
+
1591
+ where `NUMBER` is the number of words to be extracted.
1592
+
1593
+ x-categories:
1594
+ - Highlighting and Snippeting
1595
+ highlightPreTag:
1596
+ type: string
1597
+ description: >-
1598
+ HTML tag to insert before the highlighted parts in all highlighted results and snippets.
1599
+
1600
+ x-categories:
1601
+ - Highlighting and Snippeting
1602
+ highlightPostTag:
1603
+ type: string
1604
+ description: >-
1605
+ HTML tag to insert after the highlighted parts in all highlighted results and snippets.
1606
+
1607
+ x-categories:
1608
+ - Highlighting and Snippeting
1609
+ snippetEllipsisText:
1610
+ type: string
1611
+ description: String used as an ellipsis indicator when a snippet is truncated.
1612
+ x-categories:
1613
+ - Highlighting and Snippeting
1614
+ restrictHighlightAndSnippetArrays:
1615
+ type: boolean
1616
+ description: >
1617
+ Whether to restrict highlighting and snippeting to items that at least partially matched the search query.
1618
+
1619
+ By default, all items are highlighted and snippeted.
1620
+
1621
+ x-categories:
1622
+ - Highlighting and Snippeting
1623
+ hitsPerPage:
1624
+ $ref: '#/components/schemas/hitsPerPage'
1625
+ minWordSizefor1Typo:
1626
+ type: integer
1627
+ description: >-
1628
+ Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
1629
+
1630
+ x-categories:
1631
+ - Typos
1632
+ minWordSizefor2Typos:
1633
+ type: integer
1634
+ description: >-
1635
+ Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
1636
+
1637
+ x-categories:
1638
+ - Typos
1639
+ typoTolerance:
1640
+ $ref: '#/components/schemas/typoTolerance'
1641
+ allowTyposOnNumericTokens:
1642
+ type: boolean
1643
+ description: |
1644
+ Whether to allow typos on numbers in the search query.
1645
+
1646
+ Turn off this setting to reduce the number of irrelevant matches
1647
+ when searching in large sets of similar numbers.
1648
+ x-categories:
1649
+ - Typos
1650
+ disableTypoToleranceOnAttributes:
1651
+ type: array
1652
+ items:
1653
+ type: string
1654
+ example:
1655
+ - sku
1656
+ description: >
1657
+ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
1658
+
1659
+ Attribute names are case-sensitive.
1660
+
1661
+
1662
+ Returning only exact matches can help when:
1663
+
1664
+
1665
+ - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).
1666
+
1667
+ - Reducing the number of matches when you have too many.
1668
+ This can happen with attributes that are long blocks of text, such as product descriptions.
1669
+
1670
+ Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
1671
+
1672
+ x-categories:
1673
+ - Typos
1674
+ ignorePlurals:
1675
+ $ref: '#/components/schemas/ignorePlurals'
1676
+ removeStopWords:
1677
+ $ref: '#/components/schemas/removeStopWords'
1678
+ keepDiacriticsOnCharacters:
1679
+ type: string
1680
+ example: øé
1681
+ description: |
1682
+ Characters for which diacritics should be preserved.
1683
+
1684
+ By default, Algolia removes diacritics from letters.
1685
+ For example, `é` becomes `e`. If this causes issues in your search,
1686
+ you can specify characters that should keep their diacritics.
1687
+ x-categories:
1688
+ - Languages
1689
+ queryLanguages:
1690
+ type: array
1691
+ items:
1692
+ $ref: '#/components/schemas/supportedLanguage'
1693
+ example:
1694
+ - es
1695
+ description: >
1696
+ Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.
1697
+
1698
+
1699
+ This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.
1700
+
1701
+ This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.
1702
+
1703
+ To support this, you must place the CJK language **first**.
1704
+
1705
+
1706
+ **You should always specify a query language.**
1707
+
1708
+ If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),
1709
+
1710
+ or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.
1711
+
1712
+ This can lead to unexpected search results.
1713
+
1714
+ For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
1715
+
1716
+ x-categories:
1717
+ - Languages
1718
+ decompoundQuery:
1719
+ type: boolean
1720
+ description: >
1721
+ Whether to split compound words in the query into their building blocks.
1722
+
1723
+
1724
+ For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).
1725
+
1726
+ Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
1727
+
1728
+ Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).
1729
+
1730
+ For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
1731
+
1732
+ x-categories:
1733
+ - Languages
1734
+ enableRules:
1735
+ type: boolean
1736
+ description: Whether to enable rules.
1737
+ x-categories:
1738
+ - Rules
1739
+ enablePersonalization:
1740
+ type: boolean
1741
+ description: Whether to enable Personalization.
1742
+ x-categories:
1743
+ - Personalization
1744
+ queryType:
1745
+ $ref: '#/components/schemas/queryType'
1746
+ removeWordsIfNoResults:
1747
+ $ref: '#/components/schemas/removeWordsIfNoResults'
1748
+ mode:
1749
+ $ref: '#/components/schemas/mode'
1750
+ semanticSearch:
1751
+ $ref: '#/components/schemas/semanticSearch'
1752
+ advancedSyntax:
1753
+ type: boolean
1754
+ description: >
1755
+ Whether to support phrase matching and excluding words from search queries.
1756
+
1757
+
1758
+ Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
1759
+
1760
+ x-categories:
1761
+ - Query strategy
1762
+ optionalWords:
1763
+ type: array
1764
+ items:
1765
+ type: string
1766
+ example:
1767
+ - blue
1768
+ - iphone case
1769
+ description: >
1770
+ Words that should be considered optional when found in the query.
1771
+
1772
+
1773
+ By default, records must match all words in the search query to be included in the search results.
1774
+
1775
+ Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.
1776
+
1777
+ For example, if the search query is "action video" and "video" is an optional word,
1778
+
1779
+ the search engine runs two queries. One for "action video" and one for "action".
1780
+
1781
+ Records that match all words are ranked higher.
1782
+
1783
+
1784
+ For a search query with 4 or more words **and** all its words are optional,
1785
+
1786
+ the number of matched words required for a record to be included in the search results increases for every 1,000 records:
1787
+
1788
+
1789
+ - If `optionalWords` has less than 10 words, the required number of matched words increases by 1:
1790
+ results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.
1791
+ - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down).
1792
+ For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.
1793
+
1794
+ For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
1795
+
1796
+ x-categories:
1797
+ - Query strategy
1798
+ disableExactOnAttributes:
1799
+ type: array
1800
+ items:
1801
+ type: string
1802
+ example:
1803
+ - description
1804
+ description: >
1805
+ Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).
1806
+
1807
+ Attribute names are case-sensitive.
1808
+
1809
+
1810
+ This can be useful for attributes with long values, where the likelyhood of an exact match is high,
1811
+
1812
+ such as product descriptions.
1813
+
1814
+ Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes.
1815
+
1816
+ This reduces the impact of individual attributes with a lot of content on ranking.
1817
+
1818
+ x-categories:
1819
+ - Query strategy
1820
+ exactOnSingleWordQuery:
1821
+ $ref: '#/components/schemas/exactOnSingleWordQuery'
1822
+ alternativesAsExact:
1823
+ type: array
1824
+ items:
1825
+ $ref: '#/components/schemas/alternativesAsExact'
1826
+ description: >
1827
+ Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
1828
+
1829
+
1830
+ - `ignorePlurals`.
1831
+ Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.
1832
+
1833
+ - `singleWordSynonym`.
1834
+ Single-word synonyms, such as "NY/NYC" are considered exact matches.
1835
+
1836
+ - `multiWordsSynonym`.
1837
+ Multi-word synonyms, such as "NY/New York" are considered exact matches.
1838
+
1839
+ x-categories:
1840
+ - Query strategy
1841
+ advancedSyntaxFeatures:
1842
+ type: array
1843
+ items:
1844
+ $ref: '#/components/schemas/advancedSyntaxFeatures'
1845
+ description: |
1846
+ Advanced search syntax features you want to support.
1847
+
1848
+ - `exactPhrase`.
1849
+ Phrases in quotes must match exactly.
1850
+ For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".
1851
+
1852
+ - `excludeWords`.
1853
+ Query words prefixed with a `-` must not occur in a record.
1854
+ For example, `search -engine` matches records that contain "search" but not "engine".
1855
+
1856
+ This setting only has an effect if `advancedSyntax` is true.
1857
+ x-categories:
1858
+ - Query strategy
1859
+ distinct:
1860
+ $ref: '#/components/schemas/distinct'
1861
+ replaceSynonymsInHighlight:
1862
+ type: boolean
1863
+ description: >
1864
+ Whether to replace a highlighted word with the matched synonym.
1865
+
1866
+
1867
+ By default, the original words are highlighted even if a synonym matches.
1868
+
1869
+ For example, with `home` as a synonym for `house` and a search for `home`,
1870
+
1871
+ records matching either "home" or "house" are included in the search results,
1872
+
1873
+ and either "home" or "house" are highlighted.
1874
+
1875
+
1876
+ With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,
1877
+
1878
+ but all occurences of "house" are replaced by "home" in the highlighted response.
1879
+
1880
+ x-categories:
1881
+ - Highlighting and Snippeting
1882
+ minProximity:
1883
+ type: integer
1884
+ minimum: 1
1885
+ maximum: 7
1886
+ description: >
1887
+ Minimum proximity score for two matching words.
1888
+
1889
+
1890
+ This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)
1891
+
1892
+ by equally scoring matches that are farther apart.
1893
+
1894
+
1895
+ For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
1896
+
1897
+ x-categories:
1898
+ - Advanced
1899
+ responseFields:
1900
+ type: array
1901
+ items:
1902
+ type: string
1903
+ description: >
1904
+ Properties to include in the API response of `search` and `browse` requests.
1905
+
1906
+
1907
+ By default, all response properties are included.
1908
+
1909
+ To reduce the response size, you can select, which attributes should be included.
1910
+
1911
+
1912
+ You can't exclude these properties:
1913
+
1914
+ `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`,
1915
+
1916
+ `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter.
1917
+
1918
+
1919
+ Don't exclude properties that you might need in your search UI.
1920
+
1921
+ x-categories:
1922
+ - Advanced
1923
+ maxFacetHits:
1924
+ $ref: '#/components/schemas/maxFacetHits'
1925
+ maxValuesPerFacet:
1926
+ type: integer
1927
+ description: Maximum number of facet values to return for each facet.
1928
+ maximum: 1000
1929
+ x-categories:
1930
+ - Faceting
1931
+ sortFacetValuesBy:
1932
+ type: string
1933
+ description: >
1934
+ Order in which to retrieve facet values.
1935
+
1936
+
1937
+ - `count`.
1938
+ Facet values are retrieved by decreasing count.
1939
+ The count is the number of matching records containing this facet value.
1940
+
1941
+ - `alpha`.
1942
+ Retrieve facet values alphabetically.
1943
+
1944
+ This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).
1945
+
1946
+ For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
1947
+
1948
+ x-categories:
1949
+ - Faceting
1950
+ attributeCriteriaComputedByMinProximity:
1951
+ type: boolean
1952
+ description: >
1953
+ Whether the best matching attribute should be determined by minimum proximity.
1954
+
1955
+
1956
+ This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.
1957
+
1958
+ If true, the best matching attribute is selected based on the minimum proximity of multiple matches.
1959
+
1960
+ Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
1961
+
1962
+ x-categories:
1963
+ - Advanced
1964
+ renderingContent:
1965
+ $ref: '#/components/schemas/renderingContent'
1966
+ enableReRanking:
1967
+ type: boolean
1968
+ description: >
1969
+ Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
1970
+
1971
+
1972
+ This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
1973
+
1974
+ x-categories:
1975
+ - Filtering
1976
+ reRankingApplyFilter:
1977
+ oneOf:
1978
+ - $ref: '#/components/schemas/reRankingApplyFilter'
1979
+ - type: 'null'
1980
+ searchParamsObject:
1981
+ title: Search parameters as object
1982
+ description: >-
1983
+ Each parameter value, including the `query` must not be larger than 512 bytes.
1984
+
1985
+ allOf:
1986
+ - $ref: '#/components/schemas/baseSearchParams'
1987
+ - $ref: '#/components/schemas/indexSettingsAsSearchParams'
1988
+ searchParams:
1989
+ $ref: '#/components/schemas/searchParamsObject'
1990
+ processingTimeMS:
1991
+ type: integer
1992
+ description: Time the server took to process the request, in milliseconds.
1993
+ example: 20
1994
+ RedirectRuleIndexMetadata:
1995
+ type: object
1996
+ properties:
1997
+ source:
1998
+ type: string
1999
+ description: Source index for the redirect rule.
2000
+ dest:
2001
+ type: string
2002
+ description: Destination index for the redirect rule.
2003
+ reason:
2004
+ type: string
2005
+ description: Reason for the redirect rule.
2006
+ succeed:
2007
+ type: boolean
2008
+ description: Redirect rule status.
2009
+ data:
2010
+ title: redirectRuleIndexData
2011
+ type: object
2012
+ description: Redirect rule data.
2013
+ required:
2014
+ - ruleObjectID
2015
+ properties:
2016
+ ruleObjectID:
2017
+ type: string
2018
+ required:
2019
+ - data
2020
+ - succeed
2021
+ - reason
2022
+ - dest
2023
+ - source
2024
+ userData:
2025
+ type: object
2026
+ example:
2027
+ settingID: f2a7b51e3503acc6a39b3784ffb84300
2028
+ pluginVersion: 1.6.0
2029
+ description: |
2030
+ An object with custom data.
2031
+
2032
+ You can store up to 32kB as custom data.
2033
+ x-categories:
2034
+ - Advanced
2035
+ baseSearchResponse:
2036
+ type: object
2037
+ additionalProperties: true
2038
+ required:
2039
+ - processingTimeMS
2040
+ properties:
2041
+ abTestID:
2042
+ type: integer
2043
+ description: >-
2044
+ A/B test ID. This is only included in the response for indices that are part of an A/B test.
2045
+
2046
+ abTestVariantID:
2047
+ type: integer
2048
+ minimum: 1
2049
+ description: >-
2050
+ Variant ID. This is only included in the response for indices that are part of an A/B test.
2051
+
2052
+ aroundLatLng:
2053
+ type: string
2054
+ description: Computed geographical location.
2055
+ example: 40.71,-74.01
2056
+ pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$
2057
+ automaticRadius:
2058
+ type: string
2059
+ description: Distance from a central coordinate provided by `aroundLatLng`.
2060
+ exhaustive:
2061
+ title: exhaustive
2062
+ type: object
2063
+ description: >-
2064
+ Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
2065
+
2066
+ properties:
2067
+ facetsCount:
2068
+ type: boolean
2069
+ title: facetsCount
2070
+ description: >-
2071
+ Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
2072
+
2073
+ facetValues:
2074
+ type: boolean
2075
+ title: facetValues
2076
+ description: The value is `false` if not all facet values are retrieved.
2077
+ nbHits:
2078
+ type: boolean
2079
+ title: nbHits
2080
+ description: >-
2081
+ Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
2082
+
2083
+ rulesMatch:
2084
+ type: boolean
2085
+ title: rulesMatch
2086
+ description: >-
2087
+ Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
2088
+
2089
+ typo:
2090
+ type: boolean
2091
+ title: typo
2092
+ description: >-
2093
+ Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
2094
+
2095
+ exhaustiveFacetsCount:
2096
+ type: boolean
2097
+ description: >-
2098
+ See the `facetsCount` field of the `exhaustive` object in the response.
2099
+
2100
+ deprecated: true
2101
+ exhaustiveNbHits:
2102
+ type: boolean
2103
+ description: See the `nbHits` field of the `exhaustive` object in the response.
2104
+ deprecated: true
2105
+ exhaustiveTypo:
2106
+ type: boolean
2107
+ description: See the `typo` field of the `exhaustive` object in the response.
2108
+ deprecated: true
2109
+ facets:
2110
+ title: facets
2111
+ type: object
2112
+ additionalProperties:
2113
+ x-additionalPropertiesName: facet
2114
+ type: object
2115
+ additionalProperties:
2116
+ x-additionalPropertiesName: facet count
2117
+ type: integer
2118
+ description: Facet counts.
2119
+ facets_stats:
2120
+ type: object
2121
+ description: Statistics for numerical facets.
2122
+ additionalProperties:
2123
+ title: facetStats
2124
+ type: object
2125
+ properties:
2126
+ min:
2127
+ type: number
2128
+ format: double
2129
+ description: Minimum value in the results.
2130
+ max:
2131
+ type: number
2132
+ format: double
2133
+ description: Maximum value in the results.
2134
+ avg:
2135
+ type: number
2136
+ format: double
2137
+ description: Average facet value in the results.
2138
+ sum:
2139
+ type: number
2140
+ format: double
2141
+ description: Sum of all values in the results.
2142
+ index:
2143
+ type: string
2144
+ example: indexName
2145
+ description: Index name used for the query.
2146
+ indexUsed:
2147
+ type: string
2148
+ description: >-
2149
+ Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
2150
+
2151
+ example: indexNameAlt
2152
+ message:
2153
+ type: string
2154
+ description: Warnings about the query.
2155
+ nbSortedHits:
2156
+ type: integer
2157
+ description: Number of hits selected and sorted by the relevant sort algorithm.
2158
+ example: 20
2159
+ parsedQuery:
2160
+ type: string
2161
+ description: >-
2162
+ Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
2163
+
2164
+ example: george clo
2165
+ processingTimeMS:
2166
+ $ref: '#/components/schemas/processingTimeMS'
2167
+ processingTimingsMS:
2168
+ type: object
2169
+ description: >-
2170
+ Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
2171
+
2172
+ queryAfterRemoval:
2173
+ type: string
2174
+ description: >-
2175
+ Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
2176
+
2177
+ redirect:
2178
+ title: redirect
2179
+ type: object
2180
+ description: >
2181
+ [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
2182
+
2183
+ properties:
2184
+ index:
2185
+ type: array
2186
+ items:
2187
+ $ref: '#/components/schemas/RedirectRuleIndexMetadata'
2188
+ renderingContent:
2189
+ $ref: '#/components/schemas/renderingContent'
2190
+ serverTimeMS:
2191
+ type: integer
2192
+ description: Time the server took to process the request, in milliseconds.
2193
+ example: 20
2194
+ serverUsed:
2195
+ type: string
2196
+ description: Host name of the server that processed the request.
2197
+ example: c2-uk-3.algolia.net
2198
+ userData:
2199
+ $ref: '#/components/schemas/userData'
2200
+ queryID:
2201
+ type: string
2202
+ description: >-
2203
+ Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
2204
+
2205
+ example: a00dbc80a8d13c4565a442e7e2dca80a
2206
+ _automaticInsights:
2207
+ type: boolean
2208
+ description: Whether automatic events collection is enabled for the application.
2209
+ nbHits:
2210
+ type: integer
2211
+ description: Number of results (hits).
2212
+ example: 20
2213
+ nbPages:
2214
+ type: integer
2215
+ description: Number of pages of results.
2216
+ example: 1
2217
+ SearchPagination:
2218
+ type: object
2219
+ additionalProperties: false
2220
+ properties:
2221
+ page:
2222
+ $ref: '#/components/schemas/page'
2223
+ nbHits:
2224
+ $ref: '#/components/schemas/nbHits'
2225
+ nbPages:
2226
+ $ref: '#/components/schemas/nbPages'
2227
+ hitsPerPage:
2228
+ $ref: '#/components/schemas/hitsPerPage'
2229
+ required:
2230
+ - page
2231
+ - nbHits
2232
+ - nbPages
2233
+ - hitsPerPage
2234
+ objectID:
2235
+ type: string
2236
+ description: Unique record identifier.
2237
+ example: test-record-123
2238
+ highlightResultMap:
2239
+ type: object
2240
+ description: Surround words that match the query with HTML tags for highlighting.
2241
+ additionalProperties:
2242
+ x-additionalPropertiesName: attribute
2243
+ $ref: '#/components/schemas/highlightResult'
2244
+ highlightedValue:
2245
+ type: string
2246
+ description: Highlighted attribute value, including HTML tags.
2247
+ example: <em>George</em> <em>Clo</em>oney
2248
+ matchLevel:
2249
+ type: string
2250
+ description: Whether the whole query string matches or only a part.
2251
+ enum:
2252
+ - none
2253
+ - partial
2254
+ - full
2255
+ highlightResultOption:
2256
+ type: object
2257
+ description: Surround words that match the query with HTML tags for highlighting.
2258
+ additionalProperties: false
2259
+ properties:
2260
+ value:
2261
+ $ref: '#/components/schemas/highlightedValue'
2262
+ matchLevel:
2263
+ $ref: '#/components/schemas/matchLevel'
2264
+ matchedWords:
2265
+ type: array
2266
+ description: List of matched words from the search query.
2267
+ example:
2268
+ - action
2269
+ items:
2270
+ type: string
2271
+ fullyHighlighted:
2272
+ type: boolean
2273
+ description: Whether the entire attribute value is highlighted.
2274
+ required:
2275
+ - value
2276
+ - matchLevel
2277
+ - matchedWords
2278
+ x-discriminator-fields:
2279
+ - matchLevel
2280
+ - matchedWords
2281
+ highlightResultOptionMap:
2282
+ type: object
2283
+ description: Surround words that match the query with HTML tags for highlighting.
2284
+ additionalProperties:
2285
+ x-additionalPropertiesName: attribute
2286
+ $ref: '#/components/schemas/highlightResultOption'
2287
+ highlightResultOptionArray:
2288
+ type: array
2289
+ description: Surround words that match the query with HTML tags for highlighting.
2290
+ items:
2291
+ $ref: '#/components/schemas/highlightResultOption'
2292
+ highlightResult:
2293
+ oneOf:
2294
+ - $ref: '#/components/schemas/highlightResultMap'
2295
+ - $ref: '#/components/schemas/highlightResultOption'
2296
+ - $ref: '#/components/schemas/highlightResultOptionMap'
2297
+ - $ref: '#/components/schemas/highlightResultOptionArray'
2298
+ snippetResultMap:
2299
+ type: object
2300
+ description: Snippets that show the context around a matching search query.
2301
+ additionalProperties:
2302
+ x-additionalPropertiesName: attribute
2303
+ $ref: '#/components/schemas/snippetResult'
2304
+ snippetResultOption:
2305
+ type: object
2306
+ description: Snippets that show the context around a matching search query.
2307
+ additionalProperties: false
2308
+ properties:
2309
+ value:
2310
+ $ref: '#/components/schemas/highlightedValue'
2311
+ matchLevel:
2312
+ $ref: '#/components/schemas/matchLevel'
2313
+ required:
2314
+ - value
2315
+ - matchLevel
2316
+ x-discriminator-fields:
2317
+ - matchLevel
2318
+ snippetResultOptionMap:
2319
+ type: object
2320
+ description: Snippets that show the context around a matching search query.
2321
+ additionalProperties:
2322
+ x-additionalPropertiesName: attribute
2323
+ $ref: '#/components/schemas/snippetResultOption'
2324
+ snippetResultOptionArray:
2325
+ type: array
2326
+ description: Snippets that show the context around a matching search query.
2327
+ items:
2328
+ $ref: '#/components/schemas/snippetResultOption'
2329
+ snippetResult:
2330
+ oneOf:
2331
+ - $ref: '#/components/schemas/snippetResultMap'
2332
+ - $ref: '#/components/schemas/snippetResultOption'
2333
+ - $ref: '#/components/schemas/snippetResultOptionMap'
2334
+ - $ref: '#/components/schemas/snippetResultOptionArray'
2335
+ matchedGeoLocation:
2336
+ type: object
2337
+ properties:
2338
+ lat:
2339
+ type: number
2340
+ format: double
2341
+ description: Latitude of the matched location.
2342
+ lng:
2343
+ type: number
2344
+ format: double
2345
+ description: Longitude of the matched location.
2346
+ distance:
2347
+ type: integer
2348
+ description: >-
2349
+ Distance between the matched location and the search location (in meters).
2350
+
2351
+ personalization:
2352
+ type: object
2353
+ properties:
2354
+ filtersScore:
2355
+ type: integer
2356
+ description: The score of the filters.
2357
+ rankingScore:
2358
+ type: integer
2359
+ description: The score of the ranking.
2360
+ score:
2361
+ type: integer
2362
+ description: The score of the event.
2363
+ rankingInfo:
2364
+ type: object
2365
+ description: Object with detailed information about the record's ranking.
2366
+ additionalProperties: false
2367
+ properties:
2368
+ filters:
2369
+ type: integer
2370
+ minimum: 0
2371
+ description: Whether a filter matched the query.
2372
+ firstMatchedWord:
2373
+ type: integer
2374
+ minimum: 0
2375
+ description: >-
2376
+ Position of the first matched word in the best matching attribute of the record.
2377
+
2378
+ geoDistance:
2379
+ type: integer
2380
+ minimum: 0
2381
+ description: >-
2382
+ Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
2383
+
2384
+ geoPrecision:
2385
+ type: integer
2386
+ minimum: 1
2387
+ description: Precision used when computing the geo distance, in meters.
2388
+ matchedGeoLocation:
2389
+ $ref: '#/components/schemas/matchedGeoLocation'
2390
+ personalization:
2391
+ $ref: '#/components/schemas/personalization'
2392
+ nbExactWords:
2393
+ type: integer
2394
+ minimum: 0
2395
+ description: Number of exactly matched words.
2396
+ nbTypos:
2397
+ type: integer
2398
+ minimum: 0
2399
+ description: Number of typos encountered when matching the record.
2400
+ promoted:
2401
+ type: boolean
2402
+ description: Whether the record was promoted by a rule.
2403
+ proximityDistance:
2404
+ type: integer
2405
+ minimum: 0
2406
+ description: >-
2407
+ Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
2408
+
2409
+ userScore:
2410
+ type: integer
2411
+ description: >-
2412
+ Overall ranking of the record, expressed as a single integer. This attribute is internal.
2413
+
2414
+ words:
2415
+ type: integer
2416
+ minimum: 1
2417
+ description: Number of matched words.
2418
+ promotedByReRanking:
2419
+ type: boolean
2420
+ description: Whether the record is re-ranked.
2421
+ required:
2422
+ - nbTypos
2423
+ - firstMatchedWord
2424
+ - geoDistance
2425
+ - nbExactWords
2426
+ - userScore
2427
+ distinctSeqID:
2428
+ type: integer
2429
+ hit:
2430
+ type: object
2431
+ description: >
2432
+ Search result.
2433
+
2434
+
2435
+ A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
2436
+
2437
+ x-is-generic: true
2438
+ additionalProperties: true
2439
+ required:
2440
+ - objectID
2441
+ properties:
2442
+ objectID:
2443
+ $ref: '#/components/schemas/objectID'
2444
+ _highlightResult:
2445
+ $ref: '#/components/schemas/highlightResultMap'
2446
+ _snippetResult:
2447
+ $ref: '#/components/schemas/snippetResultMap'
2448
+ _rankingInfo:
2449
+ $ref: '#/components/schemas/rankingInfo'
2450
+ _distinctSeqID:
2451
+ $ref: '#/components/schemas/distinctSeqID'
2452
+ searchHits:
2453
+ type: object
2454
+ additionalProperties: true
2455
+ properties:
2456
+ hits:
2457
+ type: array
2458
+ description: >
2459
+ Search results (hits).
2460
+
2461
+
2462
+ Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
2463
+
2464
+ items:
2465
+ $ref: '#/components/schemas/hit'
2466
+ query:
2467
+ $ref: '#/components/schemas/query'
2468
+ params:
2469
+ type: string
2470
+ description: URL-encoded string of all search parameters.
2471
+ example: query=a&hitsPerPage=20
2472
+ required:
2473
+ - hits
2474
+ - query
2475
+ - params
2476
+ searchResponse:
2477
+ additionalProperties: true
2478
+ allOf:
2479
+ - $ref: '#/components/schemas/baseSearchResponse'
2480
+ - $ref: '#/components/schemas/SearchPagination'
2481
+ - $ref: '#/components/schemas/searchHits'
2482
+ indexName:
2483
+ type: string
2484
+ example: products
2485
+ description: Index name (case-sensitive).
2486
+ searchTypeDefault:
2487
+ type: string
2488
+ enum:
2489
+ - default
2490
+ description: >
2491
+ - `default`: perform a search query
2492
+
2493
+ - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
2494
+
2495
+ searchForHitsOptions:
2496
+ x-is-SearchForHitsOptions: true
2497
+ type: object
2498
+ properties:
2499
+ indexName:
2500
+ $ref: '#/components/schemas/indexName'
2501
+ type:
2502
+ $ref: '#/components/schemas/searchTypeDefault'
2503
+ required:
2504
+ - indexName
2505
+ SearchForHits:
2506
+ allOf:
2507
+ - $ref: '#/components/schemas/searchParams'
2508
+ - $ref: '#/components/schemas/searchForHitsOptions'
2509
+ facetQuery:
2510
+ type: string
2511
+ description: Text to search inside the facet's values.
2512
+ example: george
2513
+ searchTypeFacet:
2514
+ type: string
2515
+ enum:
2516
+ - facet
2517
+ description: >
2518
+ - `default`: perform a search query
2519
+
2520
+ - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
2521
+
2522
+ searchForFacetsOptions:
2523
+ type: object
2524
+ properties:
2525
+ facet:
2526
+ type: string
2527
+ description: Facet name.
2528
+ indexName:
2529
+ $ref: '#/components/schemas/indexName'
2530
+ facetQuery:
2531
+ $ref: '#/components/schemas/facetQuery'
2532
+ maxFacetHits:
2533
+ $ref: '#/components/schemas/maxFacetHits'
2534
+ type:
2535
+ $ref: '#/components/schemas/searchTypeFacet'
2536
+ required:
2537
+ - indexName
2538
+ - type
2539
+ - facet
2540
+ SearchForFacets:
2541
+ allOf:
2542
+ - $ref: '#/components/schemas/searchParams'
2543
+ - $ref: '#/components/schemas/searchForFacetsOptions'
2544
+ x-discriminator-fields:
2545
+ - facet
2546
+ - type
2547
+ SearchQuery:
2548
+ oneOf:
2549
+ - $ref: '#/components/schemas/SearchForHits'
2550
+ - $ref: '#/components/schemas/SearchForFacets'
2551
+ searchStrategy:
2552
+ type: string
2553
+ enum:
2554
+ - none
2555
+ - stopIfEnoughMatches
2556
+ description: >
2557
+ Strategy for multiple search queries:
2558
+
2559
+
2560
+ - `none`. Run all queries.
2561
+
2562
+ - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results.
2563
+
2564
+ searchForFacetValuesResponse:
2565
+ type: object
2566
+ additionalProperties: false
2567
+ required:
2568
+ - facetHits
2569
+ - exhaustiveFacetsCount
2570
+ x-discriminator-fields:
2571
+ - facetHits
2572
+ properties:
2573
+ facetHits:
2574
+ type: array
2575
+ description: Matching facet values.
2576
+ items:
2577
+ title: facetHits
2578
+ type: object
2579
+ additionalProperties: false
2580
+ required:
2581
+ - value
2582
+ - highlighted
2583
+ - count
2584
+ properties:
2585
+ value:
2586
+ description: Facet value.
2587
+ example: Mobile phone
2588
+ type: string
2589
+ highlighted:
2590
+ $ref: '#/components/schemas/highlightedValue'
2591
+ count:
2592
+ description: >-
2593
+ Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
2594
+
2595
+ type: integer
2596
+ exhaustiveFacetsCount:
2597
+ type: boolean
2598
+ description: >
2599
+ Whether the facet count is exhaustive (true) or approximate (false).
2600
+
2601
+ For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
2602
+
2603
+ processingTimeMS:
2604
+ $ref: '#/components/schemas/processingTimeMS'
2605
+ searchResult:
2606
+ oneOf:
2607
+ - $ref: '#/components/schemas/searchResponse'
2608
+ - $ref: '#/components/schemas/searchForFacetValuesResponse'
2609
+ cursor:
2610
+ type: object
2611
+ additionalProperties: false
2612
+ properties:
2613
+ cursor:
2614
+ type: string
2615
+ description: >
2616
+ Cursor to get the next page of the response.
2617
+
2618
+
2619
+ The parameter must match the value returned in the response of a previous request.
2620
+
2621
+ The last page of the response does not return a `cursor` attribute.
2622
+
2623
+ example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN
2624
+ browseParamsObject:
2625
+ allOf:
2626
+ - $ref: '#/components/schemas/searchParamsObject'
2627
+ - $ref: '#/components/schemas/cursor'
2628
+ browseParams:
2629
+ oneOf:
2630
+ - $ref: '#/components/schemas/searchParamsString'
2631
+ - $ref: '#/components/schemas/browseParamsObject'
2632
+ BrowsePagination:
2633
+ type: object
2634
+ additionalProperties: false
2635
+ properties:
2636
+ page:
2637
+ $ref: '#/components/schemas/page'
2638
+ nbHits:
2639
+ $ref: '#/components/schemas/nbHits'
2640
+ nbPages:
2641
+ $ref: '#/components/schemas/nbPages'
2642
+ hitsPerPage:
2643
+ $ref: '#/components/schemas/hitsPerPage'
2644
+ browseResponse:
2645
+ allOf:
2646
+ - $ref: '#/components/schemas/baseSearchResponse'
2647
+ - $ref: '#/components/schemas/BrowsePagination'
2648
+ - $ref: '#/components/schemas/searchHits'
2649
+ - $ref: '#/components/schemas/cursor'
2650
+ createdAt:
2651
+ type: string
2652
+ example: '2023-07-04T12:49:15Z'
2653
+ description: Date and time when the object was created, in RFC 3339 format.
2654
+ taskID:
2655
+ type: integer
2656
+ format: int64
2657
+ example: 1514562690001
2658
+ description: >
2659
+ Unique identifier of a task.
2660
+
2661
+
2662
+ A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
2663
+
2664
+ deletedAt:
2665
+ type: string
2666
+ example: '2023-06-27T14:42:38.831Z'
2667
+ description: Date and time when the object was deleted, in RFC 3339 format.
2668
+ updatedAt:
2669
+ type: string
2670
+ example: '2023-07-04T12:49:15Z'
2671
+ description: Date and time when the object was updated, in RFC 3339 format.
2672
+ deleteByParams:
2673
+ type: object
2674
+ additionalProperties: false
2675
+ properties:
2676
+ facetFilters:
2677
+ $ref: '#/components/schemas/facetFilters'
2678
+ filters:
2679
+ $ref: '#/components/schemas/filters'
2680
+ numericFilters:
2681
+ $ref: '#/components/schemas/numericFilters'
2682
+ tagFilters:
2683
+ $ref: '#/components/schemas/tagFilters'
2684
+ aroundLatLng:
2685
+ $ref: '#/components/schemas/aroundLatLng'
2686
+ aroundRadius:
2687
+ $ref: '#/components/schemas/aroundRadius'
2688
+ insideBoundingBox:
2689
+ $ref: '#/components/schemas/insideBoundingBox'
2690
+ insidePolygon:
2691
+ $ref: '#/components/schemas/insidePolygon'
2692
+ updatedAtResponse:
2693
+ type: object
2694
+ description: Response, taskID, and update timestamp.
2695
+ additionalProperties: false
2696
+ required:
2697
+ - taskID
2698
+ - updatedAt
2699
+ properties:
2700
+ taskID:
2701
+ $ref: '#/components/schemas/taskID'
2702
+ updatedAt:
2703
+ $ref: '#/components/schemas/updatedAt'
2704
+ action:
2705
+ type: string
2706
+ enum:
2707
+ - addObject
2708
+ - updateObject
2709
+ - partialUpdateObject
2710
+ - partialUpdateObjectNoCreate
2711
+ - deleteObject
2712
+ - delete
2713
+ - clear
2714
+ description: Type of indexing operation.
2715
+ batchWriteParams:
2716
+ title: batchWriteParams
2717
+ description: Batch parameters.
2718
+ type: object
2719
+ additionalProperties: false
2720
+ properties:
2721
+ requests:
2722
+ type: array
2723
+ items:
2724
+ title: batchRequest
2725
+ type: object
2726
+ additionalProperties: false
2727
+ properties:
2728
+ action:
2729
+ $ref: '#/components/schemas/action'
2730
+ body:
2731
+ type: object
2732
+ description: Operation arguments (varies with specified `action`).
2733
+ example:
2734
+ name: Betty Jane McCamey
2735
+ company: Vita Foods Inc.
2736
+ email: betty@mccamey.com
2737
+ required:
2738
+ - action
2739
+ - body
2740
+ required:
2741
+ - requests
2742
+ example:
2743
+ batch:
2744
+ summary: Batch indexing request
2745
+ value:
2746
+ requests:
2747
+ - action: addObject
2748
+ body:
2749
+ name: Betty Jane McCamey
2750
+ company: Vita Foods Inc.
2751
+ email: betty@mccamey.com
2752
+ - action: addObject
2753
+ body:
2754
+ name: Gayla geimer
2755
+ company: Ortman McCain Co.
2756
+ email: gayla@geimer.com
2757
+ objectIDs:
2758
+ type: array
2759
+ items:
2760
+ type: string
2761
+ example:
2762
+ - record-1
2763
+ - record-2
2764
+ description: Unique record identifiers.
2765
+ batchResponse:
2766
+ type: object
2767
+ additionalProperties: false
2768
+ properties:
2769
+ taskID:
2770
+ $ref: '#/components/schemas/taskID'
2771
+ objectIDs:
2772
+ $ref: '#/components/schemas/objectIDs'
2773
+ required:
2774
+ - taskID
2775
+ - objectIDs
2776
+ baseIndexSettings:
2777
+ type: object
2778
+ additionalProperties: false
2779
+ properties:
2780
+ attributesForFaceting:
2781
+ type: array
2782
+ items:
2783
+ type: string
2784
+ example:
2785
+ - author
2786
+ - filterOnly(isbn)
2787
+ - searchable(edition)
2788
+ - afterDistinct(category)
2789
+ - afterDistinct(searchable(publisher))
2790
+ description: >
2791
+ Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).
2792
+
2793
+
2794
+ Facets are attributes that let you categorize search results.
2795
+
2796
+ They can be used for filtering search results.
2797
+
2798
+ By default, no attribute is used for faceting.
2799
+
2800
+ Attribute names are case-sensitive.
2801
+
2802
+
2803
+ **Modifiers**
2804
+
2805
+
2806
+ - `filterOnly("ATTRIBUTE")`.
2807
+ Allows using this attribute as a filter, but doesn't evalue the facet values.
2808
+
2809
+ - `searchable("ATTRIBUTE")`.
2810
+ Allows searching for facet values.
2811
+
2812
+ - `afterDistinct("ATTRIBUTE")`.
2813
+ Evaluates the facet count _after_ deduplication with `distinct`.
2814
+ This ensures accurate facet counts.
2815
+ You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
2816
+
2817
+ x-categories:
2818
+ - Faceting
2819
+ replicas:
2820
+ type: array
2821
+ items:
2822
+ type: string
2823
+ example:
2824
+ - virtual(prod_products_price_asc)
2825
+ - dev_products_replica
2826
+ description: >
2827
+ Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).
2828
+
2829
+
2830
+ Replicas are copies of a primary index with the same records but different settings, synonyms, or rules.
2831
+
2832
+ If you want to offer a different ranking or sorting of your search results, you'll use replica indices.
2833
+
2834
+ All index operations on a primary index are automatically forwarded to its replicas.
2835
+
2836
+ To add a replica index, you must provide the complete set of replicas to this parameter.
2837
+
2838
+ If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index.
2839
+
2840
+
2841
+ **Modifier**
2842
+
2843
+
2844
+ - `virtual("REPLICA")`.
2845
+ Create a virtual replica,
2846
+ Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
2847
+
2848
+ x-categories:
2849
+ - Ranking
2850
+ paginationLimitedTo:
2851
+ type: integer
2852
+ example: 100
2853
+ description: >
2854
+ Maximum number of search results that can be obtained through pagination.
2855
+
2856
+
2857
+ Higher pagination limits might slow down your search.
2858
+
2859
+ For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.
2860
+
2861
+ maximum: 20000
2862
+ unretrievableAttributes:
2863
+ type: array
2864
+ items:
2865
+ type: string
2866
+ example:
2867
+ - total_sales
2868
+ description: >
2869
+ Attributes that can't be retrieved at query time.
2870
+
2871
+
2872
+ This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),
2873
+
2874
+ but don't want to include it in the search results.
2875
+
2876
+ Attribute names are case-sensitive.
2877
+
2878
+ x-categories:
2879
+ - Attributes
2880
+ disableTypoToleranceOnWords:
2881
+ type: array
2882
+ items:
2883
+ type: string
2884
+ example:
2885
+ - wheel
2886
+ - 1X2BCD
2887
+ description: >
2888
+ Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
2889
+
2890
+ This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
2891
+
2892
+ x-categories:
2893
+ - Typos
2894
+ attributesToTransliterate:
2895
+ description: >
2896
+ Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).
2897
+
2898
+
2899
+ Transliteration supports searching in any of the Japanese writing systems.
2900
+
2901
+ To support transliteration, you must set the indexing language to Japanese.
2902
+
2903
+ Attribute names are case-sensitive.
2904
+
2905
+ type: array
2906
+ items:
2907
+ type: string
2908
+ example:
2909
+ - name
2910
+ - description
2911
+ x-categories:
2912
+ - Languages
2913
+ camelCaseAttributes:
2914
+ type: array
2915
+ items:
2916
+ type: string
2917
+ example:
2918
+ - description
2919
+ description: >
2920
+ Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
2921
+
2922
+ Attribute names are case-sensitive.
2923
+
2924
+ x-categories:
2925
+ - Languages
2926
+ decompoundedAttributes:
2927
+ type: object
2928
+ example:
2929
+ de:
2930
+ - name
2931
+ description: >
2932
+ Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding).
2933
+
2934
+ Attribute names are case-sensitive.
2935
+
2936
+
2937
+ Compound words are formed by combining two or more individual words,
2938
+
2939
+ and are particularly prevalent in Germanic languages—for example, "firefighter".
2940
+
2941
+ With decompounding, the individual components are indexed separately.
2942
+
2943
+
2944
+ You can specify different lists for different languages.
2945
+
2946
+ Decompounding is supported for these languages:
2947
+
2948
+ Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).
2949
+
2950
+ Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).
2951
+
2952
+ For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
2953
+
2954
+ x-categories:
2955
+ - Languages
2956
+ indexLanguages:
2957
+ type: array
2958
+ items:
2959
+ $ref: '#/components/schemas/supportedLanguage'
2960
+ example:
2961
+ - ja
2962
+ description: >
2963
+ Languages for language-specific processing steps, such as word detection and dictionary settings.
2964
+
2965
+
2966
+ **You should always specify an indexing language.**
2967
+
2968
+ If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),
2969
+
2970
+ or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.
2971
+
2972
+ This can lead to unexpected search results.
2973
+
2974
+ For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
2975
+
2976
+ x-categories:
2977
+ - Languages
2978
+ disablePrefixOnAttributes:
2979
+ type: array
2980
+ items:
2981
+ type: string
2982
+ example:
2983
+ - sku
2984
+ description: >
2985
+ Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).
2986
+
2987
+ Attribute names are case-sensitive.
2988
+
2989
+ x-categories:
2990
+ - Query strategy
2991
+ allowCompressionOfIntegerArray:
2992
+ type: boolean
2993
+ description: >
2994
+ Whether arrays with exclusively non-negative integers should be compressed for better performance.
2995
+
2996
+ If true, the compressed arrays may be reordered.
2997
+
2998
+ x-categories:
2999
+ - Performance
3000
+ numericAttributesForFiltering:
3001
+ type: array
3002
+ items:
3003
+ type: string
3004
+ description: >
3005
+ Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).
3006
+
3007
+ Attribute names are case-sensitive.
3008
+
3009
+
3010
+ By default, all numeric attributes are available as numerical filters.
3011
+
3012
+ For faster indexing, reduce the number of numeric attributes.
3013
+
3014
+
3015
+ If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.
3016
+
3017
+
3018
+ **Modifier**
3019
+
3020
+
3021
+ - `equalOnly("ATTRIBUTE")`.
3022
+ Support only filtering based on equality comparisons `=` and `!=`.
3023
+
3024
+ example:
3025
+ - equalOnly(quantity)
3026
+ - popularity
3027
+ x-categories:
3028
+ - Performance
3029
+ separatorsToIndex:
3030
+ type: string
3031
+ example: +#
3032
+ description: >
3033
+ Controls which separators are indexed.
3034
+
3035
+
3036
+ Separators are all non-letter characters except spaces and currency characters, such as $€£¥.
3037
+
3038
+ By default, separator characters aren't indexed.
3039
+
3040
+ With `separatorsToIndex`, Algolia treats separator characters as separate words.
3041
+
3042
+ For example, a search for `C#` would report two matches.
3043
+
3044
+ x-categories:
3045
+ - Typos
3046
+ searchableAttributes:
3047
+ type: array
3048
+ items:
3049
+ type: string
3050
+ example:
3051
+ - title,alternative_title
3052
+ - author
3053
+ - unordered(text)
3054
+ - emails.personal
3055
+ description: >
3056
+ Attributes used for searching. Attribute names are case-sensitive.
3057
+
3058
+
3059
+ By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.
3060
+
3061
+ With a non-empty list, Algolia only returns results with matches in the selected attributes.
3062
+
3063
+ In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first.
3064
+
3065
+ To make matches in two attributes rank equally, include them in a comma-separated string, such as `"title,alternate_title"`.
3066
+
3067
+ Attributes with the same priority are always unordered.
3068
+
3069
+
3070
+ For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/).
3071
+
3072
+
3073
+ **Modifier**
3074
+
3075
+
3076
+ - `unordered("ATTRIBUTE")`.
3077
+ Ignore the position of a match within the attribute.
3078
+
3079
+ Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
3080
+
3081
+ x-categories:
3082
+ - Attributes
3083
+ userData:
3084
+ $ref: '#/components/schemas/userData'
3085
+ customNormalization:
3086
+ description: >
3087
+ Characters and their normalized replacements.
3088
+
3089
+ This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
3090
+
3091
+ type: object
3092
+ additionalProperties:
3093
+ type: object
3094
+ additionalProperties:
3095
+ type: string
3096
+ x-categories:
3097
+ - Languages
3098
+ attributeForDistinct:
3099
+ description: >
3100
+ Attribute that should be used to establish groups of results.
3101
+
3102
+ Attribute names are case-sensitive.
3103
+
3104
+
3105
+ All records with the same value for this attribute are considered a group.
3106
+
3107
+ You can combine `attributeForDistinct` with the `distinct` search parameter to control
3108
+
3109
+ how many items per group are included in the search results.
3110
+
3111
+
3112
+ If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting.
3113
+
3114
+ This applies faceting _after_ deduplication, which will result in accurate facet counts.
3115
+
3116
+ example: url
3117
+ type: string
3118
+ indexSettings:
3119
+ description: Index settings.
3120
+ allOf:
3121
+ - $ref: '#/components/schemas/baseIndexSettings'
3122
+ - $ref: '#/components/schemas/indexSettingsAsSearchParams'
3123
+ WithPrimary:
3124
+ type: object
3125
+ additionalProperties: false
3126
+ properties:
3127
+ primary:
3128
+ type: string
3129
+ description: >
3130
+ Replica indices only: the name of the primary index for this replica.
3131
+
3132
+ settingsResponse:
3133
+ allOf:
3134
+ - $ref: '#/components/schemas/indexSettings'
3135
+ - $ref: '#/components/schemas/WithPrimary'
3136
+ SynonymType:
3137
+ type: string
3138
+ description: Synonym type.
3139
+ example: onewaysynonym
3140
+ enum:
3141
+ - synonym
3142
+ - onewaysynonym
3143
+ - altcorrection1
3144
+ - altcorrection2
3145
+ - placeholder
3146
+ synonymHit:
3147
+ type: object
3148
+ description: Synonym object.
3149
+ additionalProperties: false
3150
+ properties:
3151
+ objectID:
3152
+ type: string
3153
+ description: Unique identifier of a synonym object.
3154
+ example: synonymID
3155
+ type:
3156
+ $ref: '#/components/schemas/SynonymType'
3157
+ synonyms:
3158
+ type: array
3159
+ items:
3160
+ type: string
3161
+ description: Words or phrases considered equivalent.
3162
+ example:
3163
+ - vehicle
3164
+ - auto
3165
+ input:
3166
+ type: string
3167
+ description: >-
3168
+ Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
3169
+
3170
+ example: car
3171
+ word:
3172
+ type: string
3173
+ description: >-
3174
+ Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
3175
+
3176
+ example: car
3177
+ corrections:
3178
+ type: array
3179
+ items:
3180
+ type: string
3181
+ description: Words to be matched in records.
3182
+ example:
3183
+ - vehicle
3184
+ - auto
3185
+ placeholder:
3186
+ type: string
3187
+ description: >
3188
+ [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
3189
+
3190
+ example: <Street>
3191
+ replacements:
3192
+ type: array
3193
+ items:
3194
+ type: string
3195
+ description: >-
3196
+ Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
3197
+
3198
+ example:
3199
+ - street
3200
+ - st
3201
+ required:
3202
+ - objectID
3203
+ - type
3204
+ id:
3205
+ type: string
3206
+ example: '12'
3207
+ description: Unique identifier of a synonym object.
3208
+ synonymHits:
3209
+ type: array
3210
+ description: Matching synonyms.
3211
+ items:
3212
+ $ref: '#/components/schemas/synonymHit'
3213
+ searchSynonymsResponse:
3214
+ type: object
3215
+ additionalProperties: true
3216
+ properties:
3217
+ hits:
3218
+ $ref: '#/components/schemas/synonymHits'
3219
+ nbHits:
3220
+ $ref: '#/components/schemas/nbHits'
3221
+ required:
3222
+ - hits
3223
+ - nbHits
3224
+ keyString:
3225
+ type: string
3226
+ description: API key.
3227
+ example: 13ad45b4d0a2f6ea65ecbddf6aa260f2
3228
+ createdAtTimestamp:
3229
+ type: integer
3230
+ format: int64
3231
+ example: 1656345570000
3232
+ description: >-
3233
+ Timestamp when the object was created, in milliseconds since the Unix epoch.
3234
+
3235
+ baseGetApiKeyResponse:
3236
+ type: object
3237
+ additionalProperties: false
3238
+ properties:
3239
+ value:
3240
+ $ref: '#/components/schemas/keyString'
3241
+ createdAt:
3242
+ $ref: '#/components/schemas/createdAtTimestamp'
3243
+ required:
3244
+ - key
3245
+ - createdAt
3246
+ acl:
3247
+ description: Access control list permissions.
3248
+ type: string
3249
+ enum:
3250
+ - addObject
3251
+ - analytics
3252
+ - browse
3253
+ - deleteObject
3254
+ - deleteIndex
3255
+ - editSettings
3256
+ - inference
3257
+ - listIndexes
3258
+ - logs
3259
+ - personalization
3260
+ - recommendation
3261
+ - search
3262
+ - seeUnretrievableAttributes
3263
+ - settings
3264
+ - usage
3265
+ apiKey:
3266
+ type: object
3267
+ description: API key object.
3268
+ additionalProperties: false
3269
+ properties:
3270
+ acl:
3271
+ type: array
3272
+ description: >
3273
+ Permissions that determine the type of API requests this key can make.
3274
+
3275
+ The required ACL is listed in each endpoint's reference.
3276
+
3277
+ For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
3278
+
3279
+ example:
3280
+ - search
3281
+ - addObject
3282
+ items:
3283
+ $ref: '#/components/schemas/acl'
3284
+ description:
3285
+ type: string
3286
+ description: Description of an API key to help you identify this API key.
3287
+ example: Used for indexing by the CLI
3288
+ indexes:
3289
+ type: array
3290
+ description: >
3291
+ Index names or patterns that this API key can access.
3292
+
3293
+ By default, an API key can access all indices in the same application.
3294
+
3295
+
3296
+ You can use leading and trailing wildcard characters (`*`):
3297
+
3298
+
3299
+ - `dev_*` matches all indices starting with "dev_".
3300
+
3301
+ - `*_dev` matches all indices ending with "_dev".
3302
+
3303
+ - `*_products_*` matches all indices containing "_products_".
3304
+
3305
+ example:
3306
+ - dev_*
3307
+ - prod_en_products
3308
+ items:
3309
+ type: string
3310
+ maxHitsPerQuery:
3311
+ type: integer
3312
+ description: |
3313
+ Maximum number of results this API key can retrieve in one query.
3314
+ By default, there's no limit.
3315
+ maxQueriesPerIPPerHour:
3316
+ type: integer
3317
+ description: >
3318
+ Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour.
3319
+
3320
+
3321
+ If this limit is reached, the API returns an error with status code `429`.
3322
+
3323
+ By default, there's no limit.
3324
+
3325
+ queryParameters:
3326
+ type: string
3327
+ description: >
3328
+ Query parameters to add when making API requests with this API key.
3329
+
3330
+
3331
+ To restrict this API key to specific IP addresses, add the `restrictSources` parameter.
3332
+
3333
+ You can only add a single source, but you can provide a range of IP addresses.
3334
+
3335
+
3336
+ Creating an API key fails if the request is made from an IP address that's outside the restricted range.
3337
+
3338
+ example: typoTolerance=strict&restrictSources=192.168.1.0/24
3339
+ referers:
3340
+ type: array
3341
+ description: >
3342
+ Allowed HTTP referrers for this API key.
3343
+
3344
+
3345
+ By default, all referrers are allowed.
3346
+
3347
+ You can use leading and trailing wildcard characters (`*`):
3348
+
3349
+
3350
+ - `https://algolia.com/*` allows all referrers starting with "https://algolia.com/"
3351
+
3352
+ - `*.algolia.com` allows all referrers ending with ".algolia.com"
3353
+
3354
+ - `*algolia.com*` allows all referrers in the domain "algolia.com".
3355
+
3356
+
3357
+ Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data.
3358
+
3359
+ For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
3360
+
3361
+ example:
3362
+ - '*algolia.com*'
3363
+ items:
3364
+ type: string
3365
+ validity:
3366
+ type: integer
3367
+ description: |
3368
+ Duration (in seconds) after which the API key expires.
3369
+ By default, API keys don't expire.
3370
+ example: 86400
3371
+ required:
3372
+ - acl
3373
+ getApiKeyResponse:
3374
+ allOf:
3375
+ - $ref: '#/components/schemas/baseGetApiKeyResponse'
3376
+ - $ref: '#/components/schemas/apiKey'
3377
+ addApiKeyResponse:
3378
+ type: object
3379
+ additionalProperties: false
3380
+ properties:
3381
+ key:
3382
+ $ref: '#/components/schemas/keyString'
3383
+ createdAt:
3384
+ $ref: '#/components/schemas/createdAt'
3385
+ required:
3386
+ - key
3387
+ - createdAt
3388
+ ruleID:
3389
+ title: objectID
3390
+ type: string
3391
+ description: Unique identifier of a rule object.
3392
+ anchoring:
3393
+ type: string
3394
+ description: |
3395
+ Which part of the search query the pattern should match:
3396
+
3397
+ - `startsWith`. The pattern must match the begginning of the query.
3398
+ - `endsWith`. The pattern must match the end of the query.
3399
+ - `is`. The pattern must match the query exactly.
3400
+ - `contains`. The pattern must match anywhere in the query.
3401
+
3402
+ Empty queries are only allowed as pattern with `anchoring: is`.
3403
+ enum:
3404
+ - is
3405
+ - startsWith
3406
+ - endsWith
3407
+ - contains
3408
+ context:
3409
+ type: string
3410
+ pattern: '[A-Za-z0-9_-]+'
3411
+ description: >
3412
+ An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter.
3413
+
3414
+ For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`.
3415
+
3416
+ A rule context must only contain alphanumeric characters.
3417
+
3418
+ example: mobile
3419
+ condition:
3420
+ type: object
3421
+ additionalProperties: false
3422
+ properties:
3423
+ pattern:
3424
+ type: string
3425
+ description: >
3426
+ Query pattern that triggers the rule.
3427
+
3428
+
3429
+ You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name.
3430
+
3431
+ The rule is triggered if the query matches the literal string or a value of the specified facet.
3432
+
3433
+ For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as "comedy".
3434
+
3435
+ example: '{facet:genre}'
3436
+ anchoring:
3437
+ $ref: '#/components/schemas/anchoring'
3438
+ alternatives:
3439
+ type: boolean
3440
+ description: Whether the pattern should match plurals, synonyms, and typos.
3441
+ context:
3442
+ $ref: '#/components/schemas/context'
3443
+ filters:
3444
+ type: string
3445
+ description: >
3446
+ Filters that trigger the rule.
3447
+
3448
+
3449
+ You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected.
3450
+
3451
+ You can use `filters` on its own or combine it with the `pattern` parameter.
3452
+
3453
+ example: genre:comedy
3454
+ editType:
3455
+ description: Type of edit.
3456
+ type: string
3457
+ enum:
3458
+ - remove
3459
+ - replace
3460
+ edit:
3461
+ type: object
3462
+ additionalProperties: false
3463
+ properties:
3464
+ type:
3465
+ $ref: '#/components/schemas/editType'
3466
+ delete:
3467
+ description: Text or patterns to remove from the query string.
3468
+ type: string
3469
+ insert:
3470
+ description: >-
3471
+ Text to be added in place of the deleted text inside the query string.
3472
+
3473
+ type: string
3474
+ consequenceQueryObject:
3475
+ type: object
3476
+ additionalProperties: false
3477
+ properties:
3478
+ remove:
3479
+ description: Words to remove from the search query.
3480
+ type: array
3481
+ items:
3482
+ type: string
3483
+ edits:
3484
+ description: Changes to make to the search query.
3485
+ type: array
3486
+ items:
3487
+ $ref: '#/components/schemas/edit'
3488
+ consequenceQuery:
3489
+ description: >
3490
+ Replace or edit the search query.
3491
+
3492
+
3493
+ If `consequenceQuery` is a string, the entire search query is replaced with that string.
3494
+
3495
+ If `consequenceQuery` is an object, it describes incremental edits made to the query.
3496
+
3497
+ oneOf:
3498
+ - $ref: '#/components/schemas/consequenceQueryObject'
3499
+ - type: string
3500
+ automaticFacetFilter:
3501
+ type: object
3502
+ description: Filter or optional filter to be applied to the search.
3503
+ additionalProperties: false
3504
+ properties:
3505
+ facet:
3506
+ type: string
3507
+ description: >
3508
+ Facet name to be applied as filter.
3509
+
3510
+ The name must match placeholders in the `pattern` parameter.
3511
+
3512
+ For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
3513
+
3514
+ score:
3515
+ type: integer
3516
+ description: Filter scores to give different weights to individual filters.
3517
+ disjunctive:
3518
+ type: boolean
3519
+ description: >
3520
+ Whether the filter is disjunctive or conjunctive.
3521
+
3522
+
3523
+ If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation.
3524
+
3525
+ If false, multiple occurences are combined with the logical `AND` operation.
3526
+
3527
+ required:
3528
+ - facet
3529
+ automaticFacetFilters:
3530
+ description: >
3531
+ Filter to be applied to the search.
3532
+
3533
+
3534
+ You can use this to respond to search queries that match a facet value.
3535
+
3536
+ For example, if users search for "comedy", which matches a facet value of the "genre" facet,
3537
+
3538
+ you can filter the results to show the top-ranked comedy movies.
3539
+
3540
+ oneOf:
3541
+ - type: array
3542
+ items:
3543
+ $ref: '#/components/schemas/automaticFacetFilter'
3544
+ - type: array
3545
+ items:
3546
+ type: string
3547
+ params:
3548
+ type: object
3549
+ description: >
3550
+ Parameters to apply to this search.
3551
+
3552
+
3553
+ You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.
3554
+
3555
+ additionalProperties: false
3556
+ properties:
3557
+ query:
3558
+ $ref: '#/components/schemas/consequenceQuery'
3559
+ automaticFacetFilters:
3560
+ $ref: '#/components/schemas/automaticFacetFilters'
3561
+ automaticOptionalFacetFilters:
3562
+ $ref: '#/components/schemas/automaticFacetFilters'
3563
+ renderingContent:
3564
+ $ref: '#/components/schemas/renderingContent'
3565
+ consequenceParams:
3566
+ allOf:
3567
+ - $ref: '#/components/schemas/baseSearchParamsWithoutQuery'
3568
+ - $ref: '#/components/schemas/indexSettingsAsSearchParams'
3569
+ - $ref: '#/components/schemas/params'
3570
+ promotePosition:
3571
+ type: integer
3572
+ description: >-
3573
+ Position in the search results where you want to show the promoted records.
3574
+
3575
+ example: 0
3576
+ promoteObjectIDs:
3577
+ title: objectIDs
3578
+ description: Records to promote.
3579
+ type: object
3580
+ additionalProperties: false
3581
+ properties:
3582
+ objectIDs:
3583
+ type: array
3584
+ maxItems: 100
3585
+ description: |
3586
+ Object IDs of the records you want to promote.
3587
+
3588
+ The records are placed as a group at the `position`.
3589
+ For example, if you want to promote four records to position `0`,
3590
+ they will be the first four search results.
3591
+ items:
3592
+ $ref: '#/components/schemas/objectID'
3593
+ position:
3594
+ $ref: '#/components/schemas/promotePosition'
3595
+ required:
3596
+ - position
3597
+ - objectIDs
3598
+ x-discriminator-fields:
3599
+ - objectIDs
3600
+ promoteObjectID:
3601
+ title: objectID
3602
+ description: Record to promote.
3603
+ type: object
3604
+ additionalProperties: false
3605
+ properties:
3606
+ objectID:
3607
+ $ref: '#/components/schemas/objectID'
3608
+ position:
3609
+ $ref: '#/components/schemas/promotePosition'
3610
+ required:
3611
+ - position
3612
+ - objectID
3613
+ x-discriminator-fields:
3614
+ - objectID
3615
+ promote:
3616
+ oneOf:
3617
+ - $ref: '#/components/schemas/promoteObjectIDs'
3618
+ - $ref: '#/components/schemas/promoteObjectID'
3619
+ consequence:
3620
+ type: object
3621
+ description: >
3622
+ Effect of the rule.
3623
+
3624
+
3625
+ For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
3626
+
3627
+ additionalProperties: false
3628
+ properties:
3629
+ params:
3630
+ $ref: '#/components/schemas/consequenceParams'
3631
+ promote:
3632
+ type: array
3633
+ maxItems: 300
3634
+ description: >
3635
+ Records you want to pin to a specific position in the search results.
3636
+
3637
+
3638
+ You can promote up to 300 records, either individually, or as groups of up to 100 records each.
3639
+
3640
+ items:
3641
+ $ref: '#/components/schemas/promote'
3642
+ filterPromotes:
3643
+ type: boolean
3644
+ description: >
3645
+ Whether promoted records must match an active filter for the consequence to be applied.
3646
+
3647
+
3648
+ This ensures that user actions (filtering the search) are given a higher precendence.
3649
+
3650
+ For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`,
3651
+
3652
+ the "red" record won't be shown.
3653
+
3654
+ hide:
3655
+ type: array
3656
+ maxItems: 50
3657
+ description: Records you want to hide from the search results.
3658
+ items:
3659
+ title: consequenceHide
3660
+ type: object
3661
+ description: Object ID of the record to hide.
3662
+ additionalProperties: false
3663
+ properties:
3664
+ objectID:
3665
+ $ref: '#/components/schemas/objectID'
3666
+ required:
3667
+ - objectID
3668
+ userData:
3669
+ description: >
3670
+ A JSON object with custom data that will be appended to the `userData` array in the response.
3671
+
3672
+ This object isn't interpreted by the API and is limited to 1&nbsp;kB of minified JSON.
3673
+
3674
+ example:
3675
+ settingID: f2a7b51e3503acc6a39b3784ffb84300
3676
+ pluginVersion: 1.6.0
3677
+ timeRange:
3678
+ type: object
3679
+ additionalProperties: false
3680
+ properties:
3681
+ from:
3682
+ type: integer
3683
+ description: When the rule should start to be active, in Unix epoch time.
3684
+ until:
3685
+ type: integer
3686
+ description: When the rule should stop to be active, in Unix epoch time.
3687
+ required:
3688
+ - from
3689
+ - until
3690
+ rule:
3691
+ type: object
3692
+ description: Rule object.
3693
+ additionalProperties: false
3694
+ properties:
3695
+ objectID:
3696
+ $ref: '#/components/schemas/ruleID'
3697
+ conditions:
3698
+ type: array
3699
+ minItems: 0
3700
+ maxItems: 25
3701
+ description: >
3702
+ Conditions that trigger a rule.
3703
+
3704
+
3705
+ Some consequences require specific conditions or don't require any condition.
3706
+
3707
+ For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
3708
+
3709
+ items:
3710
+ $ref: '#/components/schemas/condition'
3711
+ consequence:
3712
+ $ref: '#/components/schemas/consequence'
3713
+ description:
3714
+ type: string
3715
+ description: >-
3716
+ Description of the rule's purpose to help you distinguish between different rules.
3717
+
3718
+ example: Display a promotional banner
3719
+ enabled:
3720
+ type: boolean
3721
+ description: Whether the rule is active.
3722
+ validity:
3723
+ type: array
3724
+ description: Time periods when the rule is active.
3725
+ items:
3726
+ $ref: '#/components/schemas/timeRange'
3727
+ required:
3728
+ - objectID
3729
+ updatedRuleResponse:
3730
+ type: object
3731
+ additionalProperties: false
3732
+ properties:
3733
+ objectID:
3734
+ $ref: '#/components/schemas/ruleID'
3735
+ updatedAt:
3736
+ $ref: '#/components/schemas/updatedAt'
3737
+ taskID:
3738
+ $ref: '#/components/schemas/taskID'
3739
+ required:
3740
+ - objectID
3741
+ - updatedAt
3742
+ - taskID
3743
+ parameters_query:
3744
+ type: string
3745
+ description: Search query for rules.
3746
+ parameters_page:
3747
+ type: integer
3748
+ minimum: 0
3749
+ description: Requested page of the API response.
3750
+ parameters_hitsPerPage:
3751
+ type: integer
3752
+ minimum: 1
3753
+ maximum: 1000
3754
+ description: Maximum number of hits per page.
3755
+ dictionaryType:
3756
+ type: string
3757
+ enum:
3758
+ - plurals
3759
+ - stopwords
3760
+ - compounds
3761
+ dictionaryAction:
3762
+ type: string
3763
+ enum:
3764
+ - addEntry
3765
+ - deleteEntry
3766
+ description: Actions to perform.
3767
+ dictionaryEntryState:
3768
+ type: string
3769
+ enum:
3770
+ - enabled
3771
+ - disabled
3772
+ description: Whether a dictionary entry is active.
3773
+ dictionaryEntryType:
3774
+ type: string
3775
+ enum:
3776
+ - custom
3777
+ - standard
3778
+ description: >-
3779
+ Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
3780
+
3781
+ dictionaryEntry:
3782
+ type: object
3783
+ description: Dictionary entry.
3784
+ additionalProperties: true
3785
+ required:
3786
+ - objectID
3787
+ properties:
3788
+ objectID:
3789
+ type: string
3790
+ description: Unique identifier for the dictionary entry.
3791
+ example: 828afd405e1f4fe950b6b98c2c43c032
3792
+ language:
3793
+ $ref: '#/components/schemas/supportedLanguage'
3794
+ word:
3795
+ type: string
3796
+ description: >-
3797
+ Matching dictionary word for `stopwords` and `compounds` dictionaries.
3798
+
3799
+ example: the
3800
+ words:
3801
+ type: array
3802
+ description: Matching words in the `plurals` dictionary including declensions.
3803
+ example:
3804
+ - cheval
3805
+ - cheveaux
3806
+ items:
3807
+ type: string
3808
+ decomposition:
3809
+ type: array
3810
+ description: >-
3811
+ Invividual components of a compound word in the `compounds` dictionary.
3812
+
3813
+ example:
3814
+ - kopf
3815
+ - schmerz
3816
+ - tablette
3817
+ items:
3818
+ type: string
3819
+ state:
3820
+ $ref: '#/components/schemas/dictionaryEntryState'
3821
+ type:
3822
+ $ref: '#/components/schemas/dictionaryEntryType'
3823
+ searchDictionaryEntriesResponse:
3824
+ type: object
3825
+ additionalProperties: false
3826
+ properties:
3827
+ hits:
3828
+ type: array
3829
+ description: Dictionary entries matching the search criteria.
3830
+ items:
3831
+ $ref: '#/components/schemas/dictionaryEntry'
3832
+ page:
3833
+ $ref: '#/components/schemas/parameters_page'
3834
+ nbHits:
3835
+ $ref: '#/components/schemas/nbHits'
3836
+ nbPages:
3837
+ $ref: '#/components/schemas/nbPages'
3838
+ required:
3839
+ - hits
3840
+ - page
3841
+ - nbHits
3842
+ - nbPages
3843
+ standardEntry:
3844
+ oneOf:
3845
+ - type: object
3846
+ description: Key-value pair of a language ISO code and a boolean value.
3847
+ example:
3848
+ fr: false
3849
+ additionalProperties:
3850
+ x-additionalPropertiesName: language
3851
+ type: boolean
3852
+ - type: 'null'
3853
+ standardEntries:
3854
+ description: >
3855
+ Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and boolean values.
3856
+
3857
+ additionalProperties: false
3858
+ properties:
3859
+ plurals:
3860
+ $ref: '#/components/schemas/standardEntry'
3861
+ stopwords:
3862
+ $ref: '#/components/schemas/standardEntry'
3863
+ compounds:
3864
+ $ref: '#/components/schemas/standardEntry'
3865
+ dictionaryLanguage:
3866
+ oneOf:
3867
+ - type: object
3868
+ additionalProperties: false
3869
+ description: >-
3870
+ Dictionary type. If `null`, this dictionary type isn't supported for the language.
3871
+
3872
+ properties:
3873
+ nbCustomEntries:
3874
+ description: Number of custom dictionary entries.
3875
+ type: integer
3876
+ - type: 'null'
3877
+ languages:
3878
+ type: object
3879
+ description: Dictionary language.
3880
+ additionalProperties: false
3881
+ required:
3882
+ - plurals
3883
+ - stopwords
3884
+ - compounds
3885
+ properties:
3886
+ plurals:
3887
+ $ref: '#/components/schemas/dictionaryLanguage'
3888
+ stopwords:
3889
+ $ref: '#/components/schemas/dictionaryLanguage'
3890
+ compounds:
3891
+ $ref: '#/components/schemas/dictionaryLanguage'
3892
+ userID:
3893
+ type: string
3894
+ pattern: ^[a-zA-Z0-9 \-*.]+$
3895
+ description: Unique identifier of the user who makes the search request.
3896
+ example: user1
3897
+ userId:
3898
+ title: userID
3899
+ type: object
3900
+ description: Unique user ID.
3901
+ properties:
3902
+ userID:
3903
+ $ref: '#/components/schemas/userID'
3904
+ clusterName:
3905
+ type: string
3906
+ description: Cluster to which the user is assigned.
3907
+ example: c1-test
3908
+ nbRecords:
3909
+ type: integer
3910
+ description: Number of records belonging to the user.
3911
+ example: 42
3912
+ dataSize:
3913
+ type: integer
3914
+ description: Data size used by the user.
3915
+ example: 0
3916
+ required:
3917
+ - userID
3918
+ - clusterName
3919
+ - nbRecords
3920
+ - dataSize
3921
+ clusterName:
3922
+ type: string
3923
+ description: Cluster name.
3924
+ example: c11-test
3925
+ nbRecords:
3926
+ type: integer
3927
+ description: Number of records in the cluster.
3928
+ example: 3
3929
+ dataSize:
3930
+ type: integer
3931
+ description: Data size taken by all the users assigned to the cluster.
3932
+ example: 481
3933
+ source:
3934
+ description: Source.
3935
+ required:
3936
+ - source
3937
+ properties:
3938
+ source:
3939
+ description: IP address range of the source.
3940
+ type: string
3941
+ example: 10.0.0.1/32
3942
+ description:
3943
+ description: Source description.
3944
+ type: string
3945
+ example: Server subnet
3946
+ sources:
3947
+ description: Sources.
3948
+ type: array
3949
+ items:
3950
+ $ref: '#/components/schemas/source'
3951
+ logType:
3952
+ type: string
3953
+ enum:
3954
+ - all
3955
+ - query
3956
+ - build
3957
+ - error
3958
+ taskStatus:
3959
+ type: string
3960
+ enum:
3961
+ - published
3962
+ - notPublished
3963
+ description: >-
3964
+ Task status, `published` if the task is completed, `notPublished` otherwise.
3965
+
3966
+ GetTaskResponse:
3967
+ title: getTaskResponse
3968
+ type: object
3969
+ additionalProperties: false
3970
+ properties:
3971
+ status:
3972
+ $ref: '#/components/schemas/taskStatus'
3973
+ required:
3974
+ - status
3975
+ operationType:
3976
+ type: string
3977
+ enum:
3978
+ - move
3979
+ - copy
3980
+ example: copy
3981
+ description: Operation to perform on the index.
3982
+ scopeType:
3983
+ type: string
3984
+ enum:
3985
+ - settings
3986
+ - synonyms
3987
+ - rules
3988
+ fetchedIndex:
3989
+ type: object
3990
+ additionalProperties: false
3991
+ properties:
3992
+ name:
3993
+ type: string
3994
+ description: Index name.
3995
+ example: movies
3996
+ createdAt:
3997
+ type: string
3998
+ description: >-
3999
+ Index creation date. An empty string means that the index has no records.
4000
+
4001
+ example: '2022-09-19T16:36:44.471Z'
4002
+ updatedAt:
4003
+ $ref: '#/components/schemas/updatedAt'
4004
+ entries:
4005
+ type: integer
4006
+ description: Number of records contained in the index.
4007
+ example: 100
4008
+ dataSize:
4009
+ type: integer
4010
+ description: Number of bytes of the index in minified format.
4011
+ example: 48450
4012
+ fileSize:
4013
+ type: integer
4014
+ description: Number of bytes of the index binary file.
4015
+ example: 112927
4016
+ lastBuildTimeS:
4017
+ type: integer
4018
+ description: Last build time.
4019
+ example: 3
4020
+ numberOfPendingTasks:
4021
+ type: integer
4022
+ description: >-
4023
+ Number of pending indexing operations. This value is deprecated and should not be used.
4024
+
4025
+ pendingTask:
4026
+ type: boolean
4027
+ description: >-
4028
+ A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
4029
+
4030
+ primary:
4031
+ type: string
4032
+ description: >-
4033
+ Only present if the index is a replica. Contains the name of the related primary index.
4034
+
4035
+ example: T02
4036
+ replicas:
4037
+ type: array
4038
+ items:
4039
+ type: string
4040
+ description: >-
4041
+ Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
4042
+
4043
+ example:
4044
+ - T02_push
4045
+ - T2replica
4046
+ virtual:
4047
+ type: boolean
4048
+ description: >-
4049
+ Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
4050
+
4051
+ x-categories:
4052
+ - Ranking
4053
+ required:
4054
+ - name
4055
+ - createdAt
4056
+ - updatedAt
4057
+ - entries
4058
+ - dataSize
4059
+ - fileSize
4060
+ - lastBuildTimeS
4061
+ - pendingTask
4062
+ - numberOfPendingTasks
4063
+ listIndicesResponse:
4064
+ type: object
4065
+ additionalProperties: false
4066
+ properties:
4067
+ items:
4068
+ type: array
4069
+ description: All indices in your Algolia application.
4070
+ items:
4071
+ $ref: '#/components/schemas/fetchedIndex'
4072
+ nbPages:
4073
+ type: integer
4074
+ description: Number of pages.
4075
+ example: 100
4076
+ required:
4077
+ - items
4078
+ apiKeyOperation:
4079
+ type: string
4080
+ enum:
4081
+ - add
4082
+ - delete
4083
+ - update
4084
+ securedApiKeyRestrictions:
4085
+ type: object
4086
+ additionalProperties: false
4087
+ properties:
4088
+ searchParams:
4089
+ $ref: '#/components/schemas/searchParamsObject'
4090
+ filters:
4091
+ type: string
4092
+ description: >
4093
+ Filters that apply to every search made with the secured API key.
4094
+
4095
+ Extra filters added at search time will be combined with `AND`.
4096
+
4097
+ For example, if you set `group:admin` as fixed filter on your generated API key,
4098
+
4099
+ and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`.
4100
+
4101
+ validUntil:
4102
+ type: integer
4103
+ format: int64
4104
+ description: >-
4105
+ Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
4106
+
4107
+ restrictIndices:
4108
+ type: array
4109
+ items:
4110
+ type: string
4111
+ description: >
4112
+ Index names or patterns that this API key can access.
4113
+
4114
+ By default, an API key can access all indices in the same application.
4115
+
4116
+
4117
+ You can use leading and trailing wildcard characters (`*`):
4118
+
4119
+
4120
+ - `dev_*` matches all indices starting with "dev_".
4121
+
4122
+ - `*_dev` matches all indices ending with "_dev".
4123
+
4124
+ - `*_products_*` matches all indices containing "_products_".
4125
+
4126
+ restrictSources:
4127
+ type: string
4128
+ description: >
4129
+ IP network that are allowed to use this key.
4130
+
4131
+
4132
+ You can only add a single source, but you can provide a range of IP addresses.
4133
+
4134
+ Use this to protect against API key leaking and reuse.
4135
+
4136
+ example: 192.168.1.0/24
4137
+ userToken:
4138
+ type: string
4139
+ description: >
4140
+ Pseudonymous user identifier to restrict usage of this API key to specific users.
4141
+
4142
+
4143
+ By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address.
4144
+
4145
+ To avoid this, add a user token to each generated API key.
4146
+
4147
+ replaceAllObjectsResponse:
4148
+ type: object
4149
+ additionalProperties: false
4150
+ properties:
4151
+ copyOperationResponse:
4152
+ description: >-
4153
+ The response of the `operationIndex` request for the `copy` operation.
4154
+
4155
+ $ref: '#/components/schemas/updatedAtResponse'
4156
+ batchResponses:
4157
+ type: array
4158
+ description: The response of the `batch` request(s).
4159
+ items:
4160
+ $ref: '#/components/schemas/batchResponse'
4161
+ moveOperationResponse:
4162
+ description: >-
4163
+ The response of the `operationIndex` request for the `move` operation.
4164
+
4165
+ $ref: '#/components/schemas/updatedAtResponse'
4166
+ required:
4167
+ - copyOperationResponse
4168
+ - batchResponses
4169
+ - moveOperationResponse
4170
+ builtInOperationType:
4171
+ type: string
4172
+ enum:
4173
+ - Increment
4174
+ - Decrement
4175
+ - Add
4176
+ - Remove
4177
+ - AddUnique
4178
+ - IncrementFrom
4179
+ - IncrementSet
4180
+ description: How to change the attribute.
4181
+ builtInOperationValue:
4182
+ oneOf:
4183
+ - type: string
4184
+ description: >-
4185
+ A string to append or remove for the `Add`, `Remove`, and `AddUnique` operations.
4186
+
4187
+ - type: integer
4188
+ description: A number to add, remove, or append, depending on the operation.
4189
+ builtInOperation:
4190
+ type: object
4191
+ description: Update to perform on the attribute.
4192
+ additionalProperties: false
4193
+ properties:
4194
+ _operation:
4195
+ $ref: '#/components/schemas/builtInOperationType'
4196
+ value:
4197
+ $ref: '#/components/schemas/builtInOperationValue'
4198
+ required:
4199
+ - _operation
4200
+ - value
4201
+ parameters:
4202
+ PathInPath:
4203
+ name: path
4204
+ in: path
4205
+ description: Path of the endpoint, anything after "/1" must be specified.
4206
+ required: true
4207
+ schema:
4208
+ type: string
4209
+ example: /keys
4210
+ Parameters:
4211
+ name: parameters
4212
+ in: query
4213
+ description: Query parameters to apply to the current query.
4214
+ schema:
4215
+ type: object
4216
+ additionalProperties: true
4217
+ IndexName:
4218
+ name: indexName
4219
+ in: path
4220
+ description: Name of the index on which to perform the operation.
4221
+ required: true
4222
+ schema:
4223
+ type: string
4224
+ example: YourIndexName
4225
+ ObjectID:
4226
+ name: objectID
4227
+ in: path
4228
+ description: Unique record identifier.
4229
+ required: true
4230
+ schema:
4231
+ $ref: '#/components/schemas/objectID'
4232
+ ForwardToReplicas:
4233
+ in: query
4234
+ name: forwardToReplicas
4235
+ required: false
4236
+ description: Whether changes are applied to replica indices.
4237
+ schema:
4238
+ type: boolean
4239
+ parameters_ObjectID:
4240
+ name: objectID
4241
+ in: path
4242
+ description: Unique identifier of a synonym object.
4243
+ required: true
4244
+ schema:
4245
+ type: string
4246
+ example: synonymID
4247
+ ReplaceExistingSynonyms:
4248
+ in: query
4249
+ name: replaceExistingSynonyms
4250
+ schema:
4251
+ type: boolean
4252
+ description: >-
4253
+ Whether to replace all synonyms in the index with the ones sent with this request.
4254
+
4255
+ KeyString:
4256
+ in: path
4257
+ name: key
4258
+ required: true
4259
+ schema:
4260
+ type: string
4261
+ example: YourAPIKey
4262
+ description: API key.
4263
+ ObjectIDRule:
4264
+ in: path
4265
+ name: objectID
4266
+ description: Unique identifier of a rule object.
4267
+ required: true
4268
+ schema:
4269
+ $ref: '#/components/schemas/ruleID'
4270
+ ClearExistingRules:
4271
+ in: query
4272
+ name: clearExistingRules
4273
+ required: false
4274
+ schema:
4275
+ type: boolean
4276
+ description: Whether existing rules should be deleted before adding this batch.
4277
+ DictionaryName:
4278
+ in: path
4279
+ name: dictionaryName
4280
+ description: Dictionary type in which to search.
4281
+ required: true
4282
+ schema:
4283
+ $ref: '#/components/schemas/dictionaryType'
4284
+ Page:
4285
+ in: query
4286
+ name: page
4287
+ description: |
4288
+ Requested page of the API response.
4289
+ If `null`, the API response is not paginated.
4290
+ required: false
4291
+ schema:
4292
+ oneOf:
4293
+ - type: integer
4294
+ minimum: 0
4295
+ - type: 'null'
4296
+ default: null
4297
+ HitsPerPage:
4298
+ in: query
4299
+ name: hitsPerPage
4300
+ description: Number of hits per page.
4301
+ required: false
4302
+ schema:
4303
+ type: integer
4304
+ default: 100
4305
+ UserIDInHeader:
4306
+ name: X-Algolia-User-ID
4307
+ description: Unique identifier of the user who makes the search request.
4308
+ in: header
4309
+ required: true
4310
+ schema:
4311
+ $ref: '#/components/schemas/userID'
4312
+ UserIDInPath:
4313
+ name: userID
4314
+ description: Unique identifier of the user who makes the search request.
4315
+ in: path
4316
+ required: true
4317
+ schema:
4318
+ $ref: '#/components/schemas/userID'
4319
+ responses:
4320
+ BadRequest:
4321
+ description: Bad request or request arguments.
4322
+ content:
4323
+ application/json:
4324
+ schema:
4325
+ $ref: '#/components/schemas/ErrorBase'
4326
+ FeatureNotEnabled:
4327
+ description: This feature is not enabled on your Algolia account.
4328
+ content:
4329
+ application/json:
4330
+ schema:
4331
+ $ref: '#/components/schemas/ErrorBase'
4332
+ MethodNotAllowed:
4333
+ description: Method not allowed with this API key.
4334
+ content:
4335
+ application/json:
4336
+ schema:
4337
+ $ref: '#/components/schemas/ErrorBase'
4338
+ IndexNotFound:
4339
+ description: Index not found.
4340
+ content:
4341
+ application/json:
4342
+ schema:
4343
+ $ref: '#/components/schemas/ErrorBase'
4344
+ DeletedAt:
4345
+ description: OK
4346
+ content:
4347
+ application/json:
4348
+ schema:
4349
+ title: deletedAtResponse
4350
+ description: Response, taskID, and deletion timestamp.
4351
+ additionalProperties: false
4352
+ type: object
4353
+ required:
4354
+ - taskID
4355
+ - deletedAt
4356
+ properties:
4357
+ taskID:
4358
+ $ref: '#/components/schemas/taskID'
4359
+ deletedAt:
4360
+ $ref: '#/components/schemas/deletedAt'
4361
+ UpdatedAtWithObjectId:
4362
+ description: OK
4363
+ content:
4364
+ application/json:
4365
+ schema:
4366
+ title: updatedAtWithObjectIdResponse
4367
+ description: >-
4368
+ Response, taskID, unique object identifier, and an update timestamp.
4369
+
4370
+ additionalProperties: false
4371
+ type: object
4372
+ properties:
4373
+ taskID:
4374
+ $ref: '#/components/schemas/taskID'
4375
+ updatedAt:
4376
+ $ref: '#/components/schemas/updatedAt'
4377
+ objectID:
4378
+ $ref: '#/components/schemas/objectID'
4379
+ UpdatedAt:
4380
+ description: OK
4381
+ content:
4382
+ application/json:
4383
+ schema:
4384
+ $ref: '#/components/schemas/updatedAtResponse'
4385
+ CreatedAt:
4386
+ description: OK
4387
+ content:
4388
+ application/json:
4389
+ schema:
4390
+ title: createdAtResponse
4391
+ description: Response and creation timestamp.
4392
+ additionalProperties: false
4393
+ type: object
4394
+ required:
4395
+ - createdAt
4396
+ properties:
4397
+ createdAt:
4398
+ $ref: '#/components/schemas/createdAt'
4399
+ x-tagGroups:
4400
+ - name: Search and indexing
4401
+ tags:
4402
+ - Indices
4403
+ - Records
4404
+ - Search
4405
+ - name: Relevance
4406
+ tags:
4407
+ - Rules
4408
+ - Synonyms
4409
+ - Dictionaries
4410
+ - name: Others
4411
+ tags:
4412
+ - Api Keys
4413
+ - Clusters
4414
+ - Vaults
4415
+ - Advanced
4416
+ - name: Models
4417
+ tags:
4418
+ - _model_index_settings