@algolia/n8n-nodes-algolia 0.5.2 → 0.6.0

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