algolia 3.0.0.alpha.6 → 3.0.0.alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.openapi-generator/VERSION +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/algolia/api/abtesting_client.rb +41 -21
- data/lib/algolia/api/analytics_client.rb +111 -43
- data/lib/algolia/api/ingestion_client.rb +334 -94
- data/lib/algolia/api/insights_client.rb +13 -13
- data/lib/algolia/api/monitoring_client.rb +32 -33
- data/lib/algolia/api/personalization_client.rb +34 -18
- data/lib/algolia/api/query_suggestions_client.rb +55 -27
- data/lib/algolia/api/recommend_client.rb +46 -26
- data/lib/algolia/api/search_client.rb +459 -171
- data/lib/algolia/api_client.rb +0 -4
- data/lib/algolia/models/abtesting/ab_test.rb +7 -1
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +3 -1
- data/lib/algolia/models/abtesting/variant.rb +24 -5
- data/lib/algolia/models/analytics/click_through_rate_event.rb +3 -1
- data/lib/algolia/models/analytics/conversion_rate_event.rb +3 -1
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +3 -1
- data/lib/algolia/models/analytics/get_conversation_rate_response.rb +3 -1
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +3 -1
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +3 -1
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +1 -11
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -11
- data/lib/algolia/models/recommend/highlight_result.rb +1 -0
- data/lib/algolia/models/recommend/snippet_result.rb +1 -0
- data/lib/algolia/models/search/highlight_result.rb +1 -0
- data/lib/algolia/models/search/snippet_result.rb +1 -0
- data/lib/algolia/transport/http/http_requester.rb +2 -2
- data/lib/algolia/transport/stateful_host.rb +2 -1
- data/lib/algolia/transport/transport.rb +7 -4
- data/lib/algolia/version.rb +1 -1
- metadata +2 -2
@@ -29,8 +29,10 @@ module Algolia
|
|
29
29
|
new(config)
|
30
30
|
end
|
31
31
|
|
32
|
-
# Add API key.
|
33
32
|
# Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
33
|
+
#
|
34
|
+
# Required API Key ACLs:
|
35
|
+
# - admin
|
34
36
|
# @param api_key [ApiKey] (required)
|
35
37
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
36
38
|
# @return [Http::Response] the response
|
@@ -59,8 +61,10 @@ module Algolia
|
|
59
61
|
@api_client.call_api(:POST, path, new_options)
|
60
62
|
end
|
61
63
|
|
62
|
-
# Add API key.
|
63
64
|
# Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
65
|
+
#
|
66
|
+
# Required API Key ACLs:
|
67
|
+
# - admin
|
64
68
|
# @param api_key [ApiKey] (required)
|
65
69
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
66
70
|
# @return [AddApiKeyResponse]
|
@@ -69,8 +73,10 @@ module Algolia
|
|
69
73
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
70
74
|
end
|
71
75
|
|
72
|
-
# Add or update a record (using objectID).
|
73
76
|
# If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
|
77
|
+
#
|
78
|
+
# Required API Key ACLs:
|
79
|
+
# - addObject
|
74
80
|
# @param index_name [String] Index on which to perform the request. (required)
|
75
81
|
# @param object_id [String] Unique record (object) identifier. (required)
|
76
82
|
# @param body [Object] Algolia record. (required)
|
@@ -90,8 +96,8 @@ module Algolia
|
|
90
96
|
raise ArgumentError, "Parameter `body` is required when calling `add_or_update_object`."
|
91
97
|
end
|
92
98
|
|
93
|
-
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}',
|
94
|
-
|
99
|
+
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
100
|
+
Transport.encode_uri(object_id.to_s))
|
95
101
|
query_params = {}
|
96
102
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
97
103
|
header_params = {}
|
@@ -110,8 +116,10 @@ module Algolia
|
|
110
116
|
@api_client.call_api(:PUT, path, new_options)
|
111
117
|
end
|
112
118
|
|
113
|
-
# Add or update a record (using objectID).
|
114
119
|
# If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
|
120
|
+
#
|
121
|
+
# Required API Key ACLs:
|
122
|
+
# - addObject
|
115
123
|
# @param index_name [String] Index on which to perform the request. (required)
|
116
124
|
# @param object_id [String] Unique record (object) identifier. (required)
|
117
125
|
# @param body [Object] Algolia record. (required)
|
@@ -122,8 +130,10 @@ module Algolia
|
|
122
130
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
123
131
|
end
|
124
132
|
|
125
|
-
# Add a source.
|
126
133
|
# Add a source to the list of allowed sources.
|
134
|
+
#
|
135
|
+
# Required API Key ACLs:
|
136
|
+
# - admin
|
127
137
|
# @param source [Source] Source to add. (required)
|
128
138
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
129
139
|
# @return [Http::Response] the response
|
@@ -152,8 +162,10 @@ module Algolia
|
|
152
162
|
@api_client.call_api(:POST, path, new_options)
|
153
163
|
end
|
154
164
|
|
155
|
-
# Add a source.
|
156
165
|
# Add a source to the list of allowed sources.
|
166
|
+
#
|
167
|
+
# Required API Key ACLs:
|
168
|
+
# - admin
|
157
169
|
# @param source [Source] Source to add. (required)
|
158
170
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
159
171
|
# @return [CreatedAtResponse]
|
@@ -162,8 +174,10 @@ module Algolia
|
|
162
174
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
163
175
|
end
|
164
176
|
|
165
|
-
# Assign or move a user ID.
|
166
177
|
# Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
178
|
+
#
|
179
|
+
# Required API Key ACLs:
|
180
|
+
# - admin
|
167
181
|
# @param x_algolia_user_id [String] userID to assign. (required)
|
168
182
|
# @param assign_user_id_params [AssignUserIdParams] (required)
|
169
183
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -204,8 +218,10 @@ module Algolia
|
|
204
218
|
@api_client.call_api(:POST, path, new_options)
|
205
219
|
end
|
206
220
|
|
207
|
-
# Assign or move a user ID.
|
208
221
|
# Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
222
|
+
#
|
223
|
+
# Required API Key ACLs:
|
224
|
+
# - admin
|
209
225
|
# @param x_algolia_user_id [String] userID to assign. (required)
|
210
226
|
# @param assign_user_id_params [AssignUserIdParams] (required)
|
211
227
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -215,8 +231,8 @@ module Algolia
|
|
215
231
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
216
232
|
end
|
217
233
|
|
218
|
-
# Batch write operations on one index.
|
219
234
|
# To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name.
|
235
|
+
|
220
236
|
# @param index_name [String] Index on which to perform the request. (required)
|
221
237
|
# @param batch_write_params [BatchWriteParams] (required)
|
222
238
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -231,7 +247,7 @@ module Algolia
|
|
231
247
|
raise ArgumentError, "Parameter `batch_write_params` is required when calling `batch`."
|
232
248
|
end
|
233
249
|
|
234
|
-
path = '/1/indexes/{indexName}/batch'.sub('{' + 'indexName' + '}',
|
250
|
+
path = '/1/indexes/{indexName}/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
235
251
|
query_params = {}
|
236
252
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
237
253
|
header_params = {}
|
@@ -250,8 +266,8 @@ module Algolia
|
|
250
266
|
@api_client.call_api(:POST, path, new_options)
|
251
267
|
end
|
252
268
|
|
253
|
-
# Batch write operations on one index.
|
254
269
|
# To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name.
|
270
|
+
|
255
271
|
# @param index_name [String] Index on which to perform the request. (required)
|
256
272
|
# @param batch_write_params [BatchWriteParams] (required)
|
257
273
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -261,8 +277,10 @@ module Algolia
|
|
261
277
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BatchResponse')
|
262
278
|
end
|
263
279
|
|
264
|
-
# Batch assign userIDs.
|
265
280
|
# Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**.
|
281
|
+
#
|
282
|
+
# Required API Key ACLs:
|
283
|
+
# - admin
|
266
284
|
# @param x_algolia_user_id [String] userID to assign. (required)
|
267
285
|
# @param batch_assign_user_ids_params [BatchAssignUserIdsParams] (required)
|
268
286
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -303,8 +321,10 @@ module Algolia
|
|
303
321
|
@api_client.call_api(:POST, path, new_options)
|
304
322
|
end
|
305
323
|
|
306
|
-
# Batch assign userIDs.
|
307
324
|
# Assign multiple user IDs to a cluster. **You can't _move_ users with this operation.**.
|
325
|
+
#
|
326
|
+
# Required API Key ACLs:
|
327
|
+
# - admin
|
308
328
|
# @param x_algolia_user_id [String] userID to assign. (required)
|
309
329
|
# @param batch_assign_user_ids_params [BatchAssignUserIdsParams] (required)
|
310
330
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -314,8 +334,10 @@ module Algolia
|
|
314
334
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::CreatedAtResponse')
|
315
335
|
end
|
316
336
|
|
317
|
-
# Batch dictionary entries.
|
318
337
|
# Add or remove a batch of dictionary entries.
|
338
|
+
#
|
339
|
+
# Required API Key ACLs:
|
340
|
+
# - editSettings
|
319
341
|
# @param dictionary_name [DictionaryType] Dictionary to search in. (required)
|
320
342
|
# @param batch_dictionary_entries_params [BatchDictionaryEntriesParams] (required)
|
321
343
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -330,7 +352,7 @@ module Algolia
|
|
330
352
|
raise ArgumentError, "Parameter `batch_dictionary_entries_params` is required when calling `batch_dictionary_entries`."
|
331
353
|
end
|
332
354
|
|
333
|
-
path = '/1/dictionaries/{dictionaryName}/batch'.sub('{' + 'dictionaryName' + '}',
|
355
|
+
path = '/1/dictionaries/{dictionaryName}/batch'.sub('{' + 'dictionaryName' + '}', Transport.encode_uri(dictionary_name.to_s))
|
334
356
|
query_params = {}
|
335
357
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
336
358
|
header_params = {}
|
@@ -349,8 +371,10 @@ module Algolia
|
|
349
371
|
@api_client.call_api(:POST, path, new_options)
|
350
372
|
end
|
351
373
|
|
352
|
-
# Batch dictionary entries.
|
353
374
|
# Add or remove a batch of dictionary entries.
|
375
|
+
#
|
376
|
+
# Required API Key ACLs:
|
377
|
+
# - editSettings
|
354
378
|
# @param dictionary_name [DictionaryType] Dictionary to search in. (required)
|
355
379
|
# @param batch_dictionary_entries_params [BatchDictionaryEntriesParams] (required)
|
356
380
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -360,8 +384,10 @@ module Algolia
|
|
360
384
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
361
385
|
end
|
362
386
|
|
363
|
-
# Get all records from an index.
|
364
387
|
# Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance.
|
388
|
+
#
|
389
|
+
# Required API Key ACLs:
|
390
|
+
# - browse
|
365
391
|
# @param index_name [String] Index on which to perform the request. (required)
|
366
392
|
# @param browse_params [BrowseParams]
|
367
393
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -372,7 +398,7 @@ module Algolia
|
|
372
398
|
raise ArgumentError, "Parameter `index_name` is required when calling `browse`."
|
373
399
|
end
|
374
400
|
|
375
|
-
path = '/1/indexes/{indexName}/browse'.sub('{' + 'indexName' + '}',
|
401
|
+
path = '/1/indexes/{indexName}/browse'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
376
402
|
query_params = {}
|
377
403
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
378
404
|
header_params = {}
|
@@ -391,8 +417,10 @@ module Algolia
|
|
391
417
|
@api_client.call_api(:POST, path, new_options)
|
392
418
|
end
|
393
419
|
|
394
|
-
# Get all records from an index.
|
395
420
|
# Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance.
|
421
|
+
#
|
422
|
+
# Required API Key ACLs:
|
423
|
+
# - browse
|
396
424
|
# @param index_name [String] Index on which to perform the request. (required)
|
397
425
|
# @param browse_params [BrowseParams]
|
398
426
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -402,8 +430,10 @@ module Algolia
|
|
402
430
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::BrowseResponse')
|
403
431
|
end
|
404
432
|
|
405
|
-
# Delete all records from an index.
|
406
433
|
# Delete the records but leave settings and index-specific API keys untouched.
|
434
|
+
#
|
435
|
+
# Required API Key ACLs:
|
436
|
+
# - deleteIndex
|
407
437
|
# @param index_name [String] Index on which to perform the request. (required)
|
408
438
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
409
439
|
# @return [Http::Response] the response
|
@@ -413,7 +443,7 @@ module Algolia
|
|
413
443
|
raise ArgumentError, "Parameter `index_name` is required when calling `clear_objects`."
|
414
444
|
end
|
415
445
|
|
416
|
-
path = '/1/indexes/{indexName}/clear'.sub('{' + 'indexName' + '}',
|
446
|
+
path = '/1/indexes/{indexName}/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
417
447
|
query_params = {}
|
418
448
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
419
449
|
header_params = {}
|
@@ -432,8 +462,10 @@ module Algolia
|
|
432
462
|
@api_client.call_api(:POST, path, new_options)
|
433
463
|
end
|
434
464
|
|
435
|
-
# Delete all records from an index.
|
436
465
|
# Delete the records but leave settings and index-specific API keys untouched.
|
466
|
+
#
|
467
|
+
# Required API Key ACLs:
|
468
|
+
# - deleteIndex
|
437
469
|
# @param index_name [String] Index on which to perform the request. (required)
|
438
470
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
439
471
|
# @return [UpdatedAtResponse]
|
@@ -442,8 +474,10 @@ module Algolia
|
|
442
474
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
443
475
|
end
|
444
476
|
|
445
|
-
# Delete all rules.
|
446
477
|
# Delete all rules in the index.
|
478
|
+
#
|
479
|
+
# Required API Key ACLs:
|
480
|
+
# - editSettings
|
447
481
|
# @param index_name [String] Index on which to perform the request. (required)
|
448
482
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
449
483
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -454,7 +488,7 @@ module Algolia
|
|
454
488
|
raise ArgumentError, "Parameter `index_name` is required when calling `clear_rules`."
|
455
489
|
end
|
456
490
|
|
457
|
-
path = '/1/indexes/{indexName}/rules/clear'.sub('{' + 'indexName' + '}',
|
491
|
+
path = '/1/indexes/{indexName}/rules/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
458
492
|
query_params = {}
|
459
493
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
460
494
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -474,8 +508,10 @@ module Algolia
|
|
474
508
|
@api_client.call_api(:POST, path, new_options)
|
475
509
|
end
|
476
510
|
|
477
|
-
# Delete all rules.
|
478
511
|
# Delete all rules in the index.
|
512
|
+
#
|
513
|
+
# Required API Key ACLs:
|
514
|
+
# - editSettings
|
479
515
|
# @param index_name [String] Index on which to perform the request. (required)
|
480
516
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
481
517
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -485,8 +521,10 @@ module Algolia
|
|
485
521
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
486
522
|
end
|
487
523
|
|
488
|
-
# Delete all synonyms.
|
489
524
|
# Delete all synonyms in the index.
|
525
|
+
#
|
526
|
+
# Required API Key ACLs:
|
527
|
+
# - editSettings
|
490
528
|
# @param index_name [String] Index on which to perform the request. (required)
|
491
529
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
492
530
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -497,7 +535,7 @@ module Algolia
|
|
497
535
|
raise ArgumentError, "Parameter `index_name` is required when calling `clear_synonyms`."
|
498
536
|
end
|
499
537
|
|
500
|
-
path = '/1/indexes/{indexName}/synonyms/clear'.sub('{' + 'indexName' + '}',
|
538
|
+
path = '/1/indexes/{indexName}/synonyms/clear'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
501
539
|
query_params = {}
|
502
540
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
503
541
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -517,8 +555,10 @@ module Algolia
|
|
517
555
|
@api_client.call_api(:POST, path, new_options)
|
518
556
|
end
|
519
557
|
|
520
|
-
# Delete all synonyms.
|
521
558
|
# Delete all synonyms in the index.
|
559
|
+
#
|
560
|
+
# Required API Key ACLs:
|
561
|
+
# - editSettings
|
522
562
|
# @param index_name [String] Index on which to perform the request. (required)
|
523
563
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
524
564
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -528,8 +568,8 @@ module Algolia
|
|
528
568
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
529
569
|
end
|
530
570
|
|
531
|
-
# Send requests to the Algolia REST API.
|
532
571
|
# This method allow you to send requests to the Algolia REST API.
|
572
|
+
|
533
573
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
534
574
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
535
575
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -560,8 +600,8 @@ module Algolia
|
|
560
600
|
@api_client.call_api(:DELETE, path, new_options)
|
561
601
|
end
|
562
602
|
|
563
|
-
# Send requests to the Algolia REST API.
|
564
603
|
# This method allow you to send requests to the Algolia REST API.
|
604
|
+
|
565
605
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
566
606
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
567
607
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -571,8 +611,8 @@ module Algolia
|
|
571
611
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
572
612
|
end
|
573
613
|
|
574
|
-
# Send requests to the Algolia REST API.
|
575
614
|
# This method allow you to send requests to the Algolia REST API.
|
615
|
+
|
576
616
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
577
617
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
578
618
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -603,8 +643,8 @@ module Algolia
|
|
603
643
|
@api_client.call_api(:GET, path, new_options)
|
604
644
|
end
|
605
645
|
|
606
|
-
# Send requests to the Algolia REST API.
|
607
646
|
# This method allow you to send requests to the Algolia REST API.
|
647
|
+
|
608
648
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
609
649
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
610
650
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -614,8 +654,8 @@ module Algolia
|
|
614
654
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
615
655
|
end
|
616
656
|
|
617
|
-
# Send requests to the Algolia REST API.
|
618
657
|
# This method allow you to send requests to the Algolia REST API.
|
658
|
+
|
619
659
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
620
660
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
621
661
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -647,8 +687,8 @@ module Algolia
|
|
647
687
|
@api_client.call_api(:POST, path, new_options)
|
648
688
|
end
|
649
689
|
|
650
|
-
# Send requests to the Algolia REST API.
|
651
690
|
# This method allow you to send requests to the Algolia REST API.
|
691
|
+
|
652
692
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
653
693
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
654
694
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -659,8 +699,8 @@ module Algolia
|
|
659
699
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
660
700
|
end
|
661
701
|
|
662
|
-
# Send requests to the Algolia REST API.
|
663
702
|
# This method allow you to send requests to the Algolia REST API.
|
703
|
+
|
664
704
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
665
705
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
666
706
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -692,8 +732,8 @@ module Algolia
|
|
692
732
|
@api_client.call_api(:PUT, path, new_options)
|
693
733
|
end
|
694
734
|
|
695
|
-
# Send requests to the Algolia REST API.
|
696
735
|
# This method allow you to send requests to the Algolia REST API.
|
736
|
+
|
697
737
|
# @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
|
698
738
|
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
699
739
|
# @param body [Object] Parameters to send with the custom request.
|
@@ -704,8 +744,10 @@ module Algolia
|
|
704
744
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
|
705
745
|
end
|
706
746
|
|
707
|
-
# Delete API key.
|
708
747
|
# Delete an existing API key. The request must be authenticated with the admin API key.
|
748
|
+
#
|
749
|
+
# Required API Key ACLs:
|
750
|
+
# - admin
|
709
751
|
# @param key [String] API key. (required)
|
710
752
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
711
753
|
# @return [Http::Response] the response
|
@@ -715,7 +757,7 @@ module Algolia
|
|
715
757
|
raise ArgumentError, "Parameter `key` is required when calling `delete_api_key`."
|
716
758
|
end
|
717
759
|
|
718
|
-
path = '/1/keys/{key}'.sub('{' + 'key' + '}',
|
760
|
+
path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
|
719
761
|
query_params = {}
|
720
762
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
721
763
|
header_params = {}
|
@@ -734,8 +776,10 @@ module Algolia
|
|
734
776
|
@api_client.call_api(:DELETE, path, new_options)
|
735
777
|
end
|
736
778
|
|
737
|
-
# Delete API key.
|
738
779
|
# Delete an existing API key. The request must be authenticated with the admin API key.
|
780
|
+
#
|
781
|
+
# Required API Key ACLs:
|
782
|
+
# - admin
|
739
783
|
# @param key [String] API key. (required)
|
740
784
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
741
785
|
# @return [DeleteApiKeyResponse]
|
@@ -744,8 +788,10 @@ module Algolia
|
|
744
788
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteApiKeyResponse')
|
745
789
|
end
|
746
790
|
|
747
|
-
# Delete all records matching a query.
|
748
791
|
# This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries.
|
792
|
+
#
|
793
|
+
# Required API Key ACLs:
|
794
|
+
# - deleteIndex
|
749
795
|
# @param index_name [String] Index on which to perform the request. (required)
|
750
796
|
# @param delete_by_params [DeleteByParams] (required)
|
751
797
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -760,7 +806,7 @@ module Algolia
|
|
760
806
|
raise ArgumentError, "Parameter `delete_by_params` is required when calling `delete_by`."
|
761
807
|
end
|
762
808
|
|
763
|
-
path = '/1/indexes/{indexName}/deleteByQuery'.sub('{' + 'indexName' + '}',
|
809
|
+
path = '/1/indexes/{indexName}/deleteByQuery'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
764
810
|
query_params = {}
|
765
811
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
766
812
|
header_params = {}
|
@@ -779,8 +825,10 @@ module Algolia
|
|
779
825
|
@api_client.call_api(:POST, path, new_options)
|
780
826
|
end
|
781
827
|
|
782
|
-
# Delete all records matching a query.
|
783
828
|
# This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn't accept empty filters or queries.
|
829
|
+
#
|
830
|
+
# Required API Key ACLs:
|
831
|
+
# - deleteIndex
|
784
832
|
# @param index_name [String] Index on which to perform the request. (required)
|
785
833
|
# @param delete_by_params [DeleteByParams] (required)
|
786
834
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -790,8 +838,10 @@ module Algolia
|
|
790
838
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
791
839
|
end
|
792
840
|
|
793
|
-
# Delete index.
|
794
841
|
# Delete an existing index.
|
842
|
+
#
|
843
|
+
# Required API Key ACLs:
|
844
|
+
# - deleteIndex
|
795
845
|
# @param index_name [String] Index on which to perform the request. (required)
|
796
846
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
797
847
|
# @return [Http::Response] the response
|
@@ -801,7 +851,7 @@ module Algolia
|
|
801
851
|
raise ArgumentError, "Parameter `index_name` is required when calling `delete_index`."
|
802
852
|
end
|
803
853
|
|
804
|
-
path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}',
|
854
|
+
path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
805
855
|
query_params = {}
|
806
856
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
807
857
|
header_params = {}
|
@@ -820,8 +870,10 @@ module Algolia
|
|
820
870
|
@api_client.call_api(:DELETE, path, new_options)
|
821
871
|
end
|
822
872
|
|
823
|
-
# Delete index.
|
824
873
|
# Delete an existing index.
|
874
|
+
#
|
875
|
+
# Required API Key ACLs:
|
876
|
+
# - deleteIndex
|
825
877
|
# @param index_name [String] Index on which to perform the request. (required)
|
826
878
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
827
879
|
# @return [DeletedAtResponse]
|
@@ -830,8 +882,10 @@ module Algolia
|
|
830
882
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
831
883
|
end
|
832
884
|
|
833
|
-
# Delete a record.
|
834
885
|
# To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead.
|
886
|
+
#
|
887
|
+
# Required API Key ACLs:
|
888
|
+
# - deleteObject
|
835
889
|
# @param index_name [String] Index on which to perform the request. (required)
|
836
890
|
# @param object_id [String] Unique record (object) identifier. (required)
|
837
891
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -846,8 +900,8 @@ module Algolia
|
|
846
900
|
raise ArgumentError, "Parameter `object_id` is required when calling `delete_object`."
|
847
901
|
end
|
848
902
|
|
849
|
-
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}',
|
850
|
-
|
903
|
+
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
904
|
+
Transport.encode_uri(object_id.to_s))
|
851
905
|
query_params = {}
|
852
906
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
853
907
|
header_params = {}
|
@@ -866,8 +920,10 @@ module Algolia
|
|
866
920
|
@api_client.call_api(:DELETE, path, new_options)
|
867
921
|
end
|
868
922
|
|
869
|
-
# Delete a record.
|
870
923
|
# To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead.
|
924
|
+
#
|
925
|
+
# Required API Key ACLs:
|
926
|
+
# - deleteObject
|
871
927
|
# @param index_name [String] Index on which to perform the request. (required)
|
872
928
|
# @param object_id [String] Unique record (object) identifier. (required)
|
873
929
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -877,8 +933,10 @@ module Algolia
|
|
877
933
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
878
934
|
end
|
879
935
|
|
880
|
-
# Delete a rule.
|
881
936
|
# Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
937
|
+
#
|
938
|
+
# Required API Key ACLs:
|
939
|
+
# - editSettings
|
882
940
|
# @param index_name [String] Index on which to perform the request. (required)
|
883
941
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
884
942
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -894,8 +952,8 @@ module Algolia
|
|
894
952
|
raise ArgumentError, "Parameter `object_id` is required when calling `delete_rule`."
|
895
953
|
end
|
896
954
|
|
897
|
-
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}',
|
898
|
-
|
955
|
+
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
956
|
+
Transport.encode_uri(object_id.to_s))
|
899
957
|
query_params = {}
|
900
958
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
901
959
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -915,8 +973,10 @@ module Algolia
|
|
915
973
|
@api_client.call_api(:DELETE, path, new_options)
|
916
974
|
end
|
917
975
|
|
918
|
-
# Delete a rule.
|
919
976
|
# Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
977
|
+
#
|
978
|
+
# Required API Key ACLs:
|
979
|
+
# - editSettings
|
920
980
|
# @param index_name [String] Index on which to perform the request. (required)
|
921
981
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
922
982
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -927,8 +987,10 @@ module Algolia
|
|
927
987
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
928
988
|
end
|
929
989
|
|
930
|
-
# Remove a source.
|
931
990
|
# Remove a source from the list of allowed sources.
|
991
|
+
#
|
992
|
+
# Required API Key ACLs:
|
993
|
+
# - admin
|
932
994
|
# @param source [String] IP address range of the source. (required)
|
933
995
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
934
996
|
# @return [Http::Response] the response
|
@@ -938,7 +1000,7 @@ module Algolia
|
|
938
1000
|
raise ArgumentError, "Parameter `source` is required when calling `delete_source`."
|
939
1001
|
end
|
940
1002
|
|
941
|
-
path = '/1/security/sources/{source}'.sub('{' + 'source' + '}',
|
1003
|
+
path = '/1/security/sources/{source}'.sub('{' + 'source' + '}', Transport.encode_uri(source.to_s))
|
942
1004
|
query_params = {}
|
943
1005
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
944
1006
|
header_params = {}
|
@@ -957,8 +1019,10 @@ module Algolia
|
|
957
1019
|
@api_client.call_api(:DELETE, path, new_options)
|
958
1020
|
end
|
959
1021
|
|
960
|
-
# Remove a source.
|
961
1022
|
# Remove a source from the list of allowed sources.
|
1023
|
+
#
|
1024
|
+
# Required API Key ACLs:
|
1025
|
+
# - admin
|
962
1026
|
# @param source [String] IP address range of the source. (required)
|
963
1027
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
964
1028
|
# @return [DeleteSourceResponse]
|
@@ -967,8 +1031,10 @@ module Algolia
|
|
967
1031
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeleteSourceResponse')
|
968
1032
|
end
|
969
1033
|
|
970
|
-
# Delete a synonym.
|
971
1034
|
# Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
1035
|
+
#
|
1036
|
+
# Required API Key ACLs:
|
1037
|
+
# - editSettings
|
972
1038
|
# @param index_name [String] Index on which to perform the request. (required)
|
973
1039
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
974
1040
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -984,8 +1050,8 @@ module Algolia
|
|
984
1050
|
raise ArgumentError, "Parameter `object_id` is required when calling `delete_synonym`."
|
985
1051
|
end
|
986
1052
|
|
987
|
-
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}',
|
988
|
-
|
1053
|
+
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
1054
|
+
Transport.encode_uri(object_id.to_s))
|
989
1055
|
query_params = {}
|
990
1056
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
991
1057
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -1005,8 +1071,10 @@ module Algolia
|
|
1005
1071
|
@api_client.call_api(:DELETE, path, new_options)
|
1006
1072
|
end
|
1007
1073
|
|
1008
|
-
# Delete a synonym.
|
1009
1074
|
# Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
1075
|
+
#
|
1076
|
+
# Required API Key ACLs:
|
1077
|
+
# - editSettings
|
1010
1078
|
# @param index_name [String] Index on which to perform the request. (required)
|
1011
1079
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
1012
1080
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -1017,8 +1085,8 @@ module Algolia
|
|
1017
1085
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::DeletedAtResponse')
|
1018
1086
|
end
|
1019
1087
|
|
1020
|
-
# Get API key permissions.
|
1021
1088
|
# Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key.
|
1089
|
+
|
1022
1090
|
# @param key [String] API key. (required)
|
1023
1091
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1024
1092
|
# @return [Http::Response] the response
|
@@ -1028,7 +1096,7 @@ module Algolia
|
|
1028
1096
|
raise ArgumentError, "Parameter `key` is required when calling `get_api_key`."
|
1029
1097
|
end
|
1030
1098
|
|
1031
|
-
path = '/1/keys/{key}'.sub('{' + 'key' + '}',
|
1099
|
+
path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
|
1032
1100
|
query_params = {}
|
1033
1101
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1034
1102
|
header_params = {}
|
@@ -1047,8 +1115,8 @@ module Algolia
|
|
1047
1115
|
@api_client.call_api(:GET, path, new_options)
|
1048
1116
|
end
|
1049
1117
|
|
1050
|
-
# Get API key permissions.
|
1051
1118
|
# Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application's keys. When authenticating with other API keys, you can only retrieve information for that key.
|
1119
|
+
|
1052
1120
|
# @param key [String] API key. (required)
|
1053
1121
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1054
1122
|
# @return [GetApiKeyResponse]
|
@@ -1057,8 +1125,10 @@ module Algolia
|
|
1057
1125
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetApiKeyResponse')
|
1058
1126
|
end
|
1059
1127
|
|
1060
|
-
# List available languages.
|
1061
1128
|
# Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features.
|
1129
|
+
#
|
1130
|
+
# Required API Key ACLs:
|
1131
|
+
# - settings
|
1062
1132
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1063
1133
|
# @return [Http::Response] the response
|
1064
1134
|
def get_dictionary_languages_with_http_info(request_options = {})
|
@@ -1081,8 +1151,10 @@ module Algolia
|
|
1081
1151
|
@api_client.call_api(:GET, path, new_options)
|
1082
1152
|
end
|
1083
1153
|
|
1084
|
-
# List available languages.
|
1085
1154
|
# Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features.
|
1155
|
+
#
|
1156
|
+
# Required API Key ACLs:
|
1157
|
+
# - settings
|
1086
1158
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1087
1159
|
# @return [Hash<String, Languages>]
|
1088
1160
|
def get_dictionary_languages(request_options = {})
|
@@ -1090,8 +1162,10 @@ module Algolia
|
|
1090
1162
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, Languages>')
|
1091
1163
|
end
|
1092
1164
|
|
1093
|
-
# Get stop word settings.
|
1094
1165
|
# Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings).
|
1166
|
+
#
|
1167
|
+
# Required API Key ACLs:
|
1168
|
+
# - settings
|
1095
1169
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1096
1170
|
# @return [Http::Response] the response
|
1097
1171
|
def get_dictionary_settings_with_http_info(request_options = {})
|
@@ -1114,8 +1188,10 @@ module Algolia
|
|
1114
1188
|
@api_client.call_api(:GET, path, new_options)
|
1115
1189
|
end
|
1116
1190
|
|
1117
|
-
# Get stop word settings.
|
1118
1191
|
# Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings).
|
1192
|
+
#
|
1193
|
+
# Required API Key ACLs:
|
1194
|
+
# - settings
|
1119
1195
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1120
1196
|
# @return [GetDictionarySettingsResponse]
|
1121
1197
|
def get_dictionary_settings(request_options = {})
|
@@ -1123,8 +1199,10 @@ module Algolia
|
|
1123
1199
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetDictionarySettingsResponse')
|
1124
1200
|
end
|
1125
1201
|
|
1126
|
-
# Return the latest log entries.
|
1127
1202
|
# The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers).
|
1203
|
+
#
|
1204
|
+
# Required API Key ACLs:
|
1205
|
+
# - logs
|
1128
1206
|
# @param offset [Integer] First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (default to 0)
|
1129
1207
|
# @param length [Integer] Maximum number of entries to retrieve. (default to 10)
|
1130
1208
|
# @param index_name [String] Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
|
@@ -1159,8 +1237,10 @@ module Algolia
|
|
1159
1237
|
@api_client.call_api(:GET, path, new_options)
|
1160
1238
|
end
|
1161
1239
|
|
1162
|
-
# Return the latest log entries.
|
1163
1240
|
# The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There's also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN's endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers).
|
1241
|
+
#
|
1242
|
+
# Required API Key ACLs:
|
1243
|
+
# - logs
|
1164
1244
|
# @param offset [Integer] First log entry to retrieve. Sorted by decreasing date with 0 being the most recent. (default to 0)
|
1165
1245
|
# @param length [Integer] Maximum number of entries to retrieve. (default to 10)
|
1166
1246
|
# @param index_name [String] Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
|
@@ -1172,8 +1252,10 @@ module Algolia
|
|
1172
1252
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetLogsResponse')
|
1173
1253
|
end
|
1174
1254
|
|
1175
|
-
# Get a record.
|
1176
1255
|
# To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
1256
|
+
#
|
1257
|
+
# Required API Key ACLs:
|
1258
|
+
# - search
|
1177
1259
|
# @param index_name [String] Index on which to perform the request. (required)
|
1178
1260
|
# @param object_id [String] Unique record (object) identifier. (required)
|
1179
1261
|
# @param attributes_to_retrieve [Array<String>] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key.
|
@@ -1189,8 +1271,8 @@ module Algolia
|
|
1189
1271
|
raise ArgumentError, "Parameter `object_id` is required when calling `get_object`."
|
1190
1272
|
end
|
1191
1273
|
|
1192
|
-
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}',
|
1193
|
-
|
1274
|
+
path = '/1/indexes/{indexName}/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
1275
|
+
Transport.encode_uri(object_id.to_s))
|
1194
1276
|
query_params = {}
|
1195
1277
|
query_params[:attributesToRetrieve] = @api_client.build_collection_param(attributes_to_retrieve, :multi) unless attributes_to_retrieve.nil?
|
1196
1278
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -1210,8 +1292,10 @@ module Algolia
|
|
1210
1292
|
@api_client.call_api(:GET, path, new_options)
|
1211
1293
|
end
|
1212
1294
|
|
1213
|
-
# Get a record.
|
1214
1295
|
# To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
1296
|
+
#
|
1297
|
+
# Required API Key ACLs:
|
1298
|
+
# - search
|
1215
1299
|
# @param index_name [String] Index on which to perform the request. (required)
|
1216
1300
|
# @param object_id [String] Unique record (object) identifier. (required)
|
1217
1301
|
# @param attributes_to_retrieve [Array<String>] Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won't be retrieved unless the request is authenticated with the admin API key.
|
@@ -1222,8 +1306,10 @@ module Algolia
|
|
1222
1306
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Hash<String, String>')
|
1223
1307
|
end
|
1224
1308
|
|
1225
|
-
# Get multiple records.
|
1226
1309
|
# Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests.
|
1310
|
+
#
|
1311
|
+
# Required API Key ACLs:
|
1312
|
+
# - search
|
1227
1313
|
# @param get_objects_params [GetObjectsParams] Request object. (required)
|
1228
1314
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1229
1315
|
# @return [Http::Response] the response
|
@@ -1252,8 +1338,10 @@ module Algolia
|
|
1252
1338
|
@api_client.call_api(:POST, path, new_options)
|
1253
1339
|
end
|
1254
1340
|
|
1255
|
-
# Get multiple records.
|
1256
1341
|
# Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests.
|
1342
|
+
#
|
1343
|
+
# Required API Key ACLs:
|
1344
|
+
# - search
|
1257
1345
|
# @param get_objects_params [GetObjectsParams] Request object. (required)
|
1258
1346
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1259
1347
|
# @return [GetObjectsResponse]
|
@@ -1262,8 +1350,10 @@ module Algolia
|
|
1262
1350
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetObjectsResponse')
|
1263
1351
|
end
|
1264
1352
|
|
1265
|
-
# Get a rule.
|
1266
1353
|
# Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
1354
|
+
#
|
1355
|
+
# Required API Key ACLs:
|
1356
|
+
# - settings
|
1267
1357
|
# @param index_name [String] Index on which to perform the request. (required)
|
1268
1358
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
1269
1359
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1278,8 +1368,8 @@ module Algolia
|
|
1278
1368
|
raise ArgumentError, "Parameter `object_id` is required when calling `get_rule`."
|
1279
1369
|
end
|
1280
1370
|
|
1281
|
-
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}',
|
1282
|
-
|
1371
|
+
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
1372
|
+
Transport.encode_uri(object_id.to_s))
|
1283
1373
|
query_params = {}
|
1284
1374
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1285
1375
|
header_params = {}
|
@@ -1298,8 +1388,10 @@ module Algolia
|
|
1298
1388
|
@api_client.call_api(:GET, path, new_options)
|
1299
1389
|
end
|
1300
1390
|
|
1301
|
-
# Get a rule.
|
1302
1391
|
# Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
1392
|
+
#
|
1393
|
+
# Required API Key ACLs:
|
1394
|
+
# - settings
|
1303
1395
|
# @param index_name [String] Index on which to perform the request. (required)
|
1304
1396
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
1305
1397
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1309,8 +1401,10 @@ module Algolia
|
|
1309
1401
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::Rule')
|
1310
1402
|
end
|
1311
1403
|
|
1312
|
-
# Get index settings.
|
1313
1404
|
# Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/).
|
1405
|
+
#
|
1406
|
+
# Required API Key ACLs:
|
1407
|
+
# - search
|
1314
1408
|
# @param index_name [String] Index on which to perform the request. (required)
|
1315
1409
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1316
1410
|
# @return [Http::Response] the response
|
@@ -1320,7 +1414,7 @@ module Algolia
|
|
1320
1414
|
raise ArgumentError, "Parameter `index_name` is required when calling `get_settings`."
|
1321
1415
|
end
|
1322
1416
|
|
1323
|
-
path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}',
|
1417
|
+
path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
1324
1418
|
query_params = {}
|
1325
1419
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1326
1420
|
header_params = {}
|
@@ -1339,8 +1433,10 @@ module Algolia
|
|
1339
1433
|
@api_client.call_api(:GET, path, new_options)
|
1340
1434
|
end
|
1341
1435
|
|
1342
|
-
# Get index settings.
|
1343
1436
|
# Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/).
|
1437
|
+
#
|
1438
|
+
# Required API Key ACLs:
|
1439
|
+
# - search
|
1344
1440
|
# @param index_name [String] Index on which to perform the request. (required)
|
1345
1441
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1346
1442
|
# @return [IndexSettings]
|
@@ -1349,8 +1445,10 @@ module Algolia
|
|
1349
1445
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::IndexSettings')
|
1350
1446
|
end
|
1351
1447
|
|
1352
|
-
# Get all allowed IP addresses.
|
1353
1448
|
# Get all allowed sources (IP addresses).
|
1449
|
+
#
|
1450
|
+
# Required API Key ACLs:
|
1451
|
+
# - admin
|
1354
1452
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1355
1453
|
# @return [Http::Response] the response
|
1356
1454
|
def get_sources_with_http_info(request_options = {})
|
@@ -1373,8 +1471,10 @@ module Algolia
|
|
1373
1471
|
@api_client.call_api(:GET, path, new_options)
|
1374
1472
|
end
|
1375
1473
|
|
1376
|
-
# Get all allowed IP addresses.
|
1377
1474
|
# Get all allowed sources (IP addresses).
|
1475
|
+
#
|
1476
|
+
# Required API Key ACLs:
|
1477
|
+
# - admin
|
1378
1478
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1379
1479
|
# @return [Array<Source>]
|
1380
1480
|
def get_sources(request_options = {})
|
@@ -1382,8 +1482,10 @@ module Algolia
|
|
1382
1482
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Search::Source>')
|
1383
1483
|
end
|
1384
1484
|
|
1385
|
-
# Get a synonym object.
|
1386
1485
|
# Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
1486
|
+
#
|
1487
|
+
# Required API Key ACLs:
|
1488
|
+
# - settings
|
1387
1489
|
# @param index_name [String] Index on which to perform the request. (required)
|
1388
1490
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
1389
1491
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1398,8 +1500,8 @@ module Algolia
|
|
1398
1500
|
raise ArgumentError, "Parameter `object_id` is required when calling `get_synonym`."
|
1399
1501
|
end
|
1400
1502
|
|
1401
|
-
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}',
|
1402
|
-
|
1503
|
+
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
1504
|
+
Transport.encode_uri(object_id.to_s))
|
1403
1505
|
query_params = {}
|
1404
1506
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1405
1507
|
header_params = {}
|
@@ -1418,8 +1520,10 @@ module Algolia
|
|
1418
1520
|
@api_client.call_api(:GET, path, new_options)
|
1419
1521
|
end
|
1420
1522
|
|
1421
|
-
# Get a synonym object.
|
1422
1523
|
# Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
1524
|
+
#
|
1525
|
+
# Required API Key ACLs:
|
1526
|
+
# - settings
|
1423
1527
|
# @param index_name [String] Index on which to perform the request. (required)
|
1424
1528
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
1425
1529
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1429,8 +1533,10 @@ module Algolia
|
|
1429
1533
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SynonymHit')
|
1430
1534
|
end
|
1431
1535
|
|
1432
|
-
# Check a task's status.
|
1433
1536
|
# Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task.
|
1537
|
+
#
|
1538
|
+
# Required API Key ACLs:
|
1539
|
+
# - addObject
|
1434
1540
|
# @param index_name [String] Index on which to perform the request. (required)
|
1435
1541
|
# @param task_id [Integer] Unique task identifier. (required)
|
1436
1542
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1445,8 +1551,8 @@ module Algolia
|
|
1445
1551
|
raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
|
1446
1552
|
end
|
1447
1553
|
|
1448
|
-
path = '/1/indexes/{indexName}/task/{taskID}'.sub('{' + 'indexName' + '}',
|
1449
|
-
|
1554
|
+
path = '/1/indexes/{indexName}/task/{taskID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'taskID' + '}',
|
1555
|
+
Transport.encode_uri(task_id.to_s))
|
1450
1556
|
query_params = {}
|
1451
1557
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1452
1558
|
header_params = {}
|
@@ -1465,8 +1571,10 @@ module Algolia
|
|
1465
1571
|
@api_client.call_api(:GET, path, new_options)
|
1466
1572
|
end
|
1467
1573
|
|
1468
|
-
# Check a task's status.
|
1469
1574
|
# Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task.
|
1575
|
+
#
|
1576
|
+
# Required API Key ACLs:
|
1577
|
+
# - addObject
|
1470
1578
|
# @param index_name [String] Index on which to perform the request. (required)
|
1471
1579
|
# @param task_id [Integer] Unique task identifier. (required)
|
1472
1580
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1476,8 +1584,10 @@ module Algolia
|
|
1476
1584
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTaskResponse')
|
1477
1585
|
end
|
1478
1586
|
|
1479
|
-
# Get top userID.
|
1480
1587
|
# Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1588
|
+
#
|
1589
|
+
# Required API Key ACLs:
|
1590
|
+
# - admin
|
1481
1591
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1482
1592
|
# @return [Http::Response] the response
|
1483
1593
|
def get_top_user_ids_with_http_info(request_options = {})
|
@@ -1500,8 +1610,10 @@ module Algolia
|
|
1500
1610
|
@api_client.call_api(:GET, path, new_options)
|
1501
1611
|
end
|
1502
1612
|
|
1503
|
-
# Get top userID.
|
1504
1613
|
# Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1614
|
+
#
|
1615
|
+
# Required API Key ACLs:
|
1616
|
+
# - admin
|
1505
1617
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1506
1618
|
# @return [GetTopUserIdsResponse]
|
1507
1619
|
def get_top_user_ids(request_options = {})
|
@@ -1509,8 +1621,10 @@ module Algolia
|
|
1509
1621
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::GetTopUserIdsResponse')
|
1510
1622
|
end
|
1511
1623
|
|
1512
|
-
# Get userID.
|
1513
1624
|
# Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1625
|
+
#
|
1626
|
+
# Required API Key ACLs:
|
1627
|
+
# - admin
|
1514
1628
|
# @param user_id [String] userID to assign. (required)
|
1515
1629
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1516
1630
|
# @return [Http::Response] the response
|
@@ -1525,7 +1639,7 @@ module Algolia
|
|
1525
1639
|
raise ArgumentError, "invalid value for 'user_id' when calling SearchClient.get_user_id, must conform to the pattern #{pattern}."
|
1526
1640
|
end
|
1527
1641
|
|
1528
|
-
path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}',
|
1642
|
+
path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}', Transport.encode_uri(user_id.to_s))
|
1529
1643
|
query_params = {}
|
1530
1644
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1531
1645
|
header_params = {}
|
@@ -1544,8 +1658,10 @@ module Algolia
|
|
1544
1658
|
@api_client.call_api(:GET, path, new_options)
|
1545
1659
|
end
|
1546
1660
|
|
1547
|
-
# Get userID.
|
1548
1661
|
# Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1662
|
+
#
|
1663
|
+
# Required API Key ACLs:
|
1664
|
+
# - admin
|
1549
1665
|
# @param user_id [String] userID to assign. (required)
|
1550
1666
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1551
1667
|
# @return [UserId]
|
@@ -1554,8 +1670,10 @@ module Algolia
|
|
1554
1670
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UserId')
|
1555
1671
|
end
|
1556
1672
|
|
1557
|
-
# Get migration and user mapping status.
|
1558
1673
|
# To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
1674
|
+
#
|
1675
|
+
# Required API Key ACLs:
|
1676
|
+
# - admin
|
1559
1677
|
# @param get_clusters [Boolean] Indicates whether to include the cluster's pending mapping state in the response.
|
1560
1678
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1561
1679
|
# @return [Http::Response] the response
|
@@ -1580,8 +1698,10 @@ module Algolia
|
|
1580
1698
|
@api_client.call_api(:GET, path, new_options)
|
1581
1699
|
end
|
1582
1700
|
|
1583
|
-
# Get migration and user mapping status.
|
1584
1701
|
# To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
1702
|
+
#
|
1703
|
+
# Required API Key ACLs:
|
1704
|
+
# - admin
|
1585
1705
|
# @param get_clusters [Boolean] Indicates whether to include the cluster's pending mapping state in the response.
|
1586
1706
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1587
1707
|
# @return [HasPendingMappingsResponse]
|
@@ -1590,8 +1710,10 @@ module Algolia
|
|
1590
1710
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::HasPendingMappingsResponse')
|
1591
1711
|
end
|
1592
1712
|
|
1593
|
-
# List API keys.
|
1594
1713
|
# List all API keys associated with your Algolia application, including their permissions and restrictions.
|
1714
|
+
#
|
1715
|
+
# Required API Key ACLs:
|
1716
|
+
# - admin
|
1595
1717
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1596
1718
|
# @return [Http::Response] the response
|
1597
1719
|
def list_api_keys_with_http_info(request_options = {})
|
@@ -1614,8 +1736,10 @@ module Algolia
|
|
1614
1736
|
@api_client.call_api(:GET, path, new_options)
|
1615
1737
|
end
|
1616
1738
|
|
1617
|
-
# List API keys.
|
1618
1739
|
# List all API keys associated with your Algolia application, including their permissions and restrictions.
|
1740
|
+
#
|
1741
|
+
# Required API Key ACLs:
|
1742
|
+
# - admin
|
1619
1743
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1620
1744
|
# @return [ListApiKeysResponse]
|
1621
1745
|
def list_api_keys(request_options = {})
|
@@ -1623,8 +1747,10 @@ module Algolia
|
|
1623
1747
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListApiKeysResponse')
|
1624
1748
|
end
|
1625
1749
|
|
1626
|
-
# List clusters.
|
1627
1750
|
# List the available clusters in a multi-cluster setup.
|
1751
|
+
#
|
1752
|
+
# Required API Key ACLs:
|
1753
|
+
# - admin
|
1628
1754
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1629
1755
|
# @return [Http::Response] the response
|
1630
1756
|
def list_clusters_with_http_info(request_options = {})
|
@@ -1647,8 +1773,10 @@ module Algolia
|
|
1647
1773
|
@api_client.call_api(:GET, path, new_options)
|
1648
1774
|
end
|
1649
1775
|
|
1650
|
-
# List clusters.
|
1651
1776
|
# List the available clusters in a multi-cluster setup.
|
1777
|
+
#
|
1778
|
+
# Required API Key ACLs:
|
1779
|
+
# - admin
|
1652
1780
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1653
1781
|
# @return [ListClustersResponse]
|
1654
1782
|
def list_clusters(request_options = {})
|
@@ -1656,8 +1784,10 @@ module Algolia
|
|
1656
1784
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListClustersResponse')
|
1657
1785
|
end
|
1658
1786
|
|
1659
|
-
# List indices.
|
1660
1787
|
# List indices in an Algolia application.
|
1788
|
+
#
|
1789
|
+
# Required API Key ACLs:
|
1790
|
+
# - listIndexes
|
1661
1791
|
# @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
|
1662
1792
|
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
1663
1793
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1688,8 +1818,10 @@ module Algolia
|
|
1688
1818
|
@api_client.call_api(:GET, path, new_options)
|
1689
1819
|
end
|
1690
1820
|
|
1691
|
-
# List indices.
|
1692
1821
|
# List indices in an Algolia application.
|
1822
|
+
#
|
1823
|
+
# Required API Key ACLs:
|
1824
|
+
# - listIndexes
|
1693
1825
|
# @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
|
1694
1826
|
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
1695
1827
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1699,8 +1831,10 @@ module Algolia
|
|
1699
1831
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListIndicesResponse')
|
1700
1832
|
end
|
1701
1833
|
|
1702
|
-
# List userIDs.
|
1703
1834
|
# List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1835
|
+
#
|
1836
|
+
# Required API Key ACLs:
|
1837
|
+
# - admin
|
1704
1838
|
# @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
|
1705
1839
|
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
1706
1840
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1731,8 +1865,10 @@ module Algolia
|
|
1731
1865
|
@api_client.call_api(:GET, path, new_options)
|
1732
1866
|
end
|
1733
1867
|
|
1734
|
-
# List userIDs.
|
1735
1868
|
# List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time.
|
1869
|
+
#
|
1870
|
+
# Required API Key ACLs:
|
1871
|
+
# - admin
|
1736
1872
|
# @param page [Integer] Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
|
1737
1873
|
# @param hits_per_page [Integer] Maximum number of hits per page. (default to 100)
|
1738
1874
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1742,8 +1878,8 @@ module Algolia
|
|
1742
1878
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ListUserIdsResponse')
|
1743
1879
|
end
|
1744
1880
|
|
1745
|
-
# Batch write operations on multiple indices.
|
1746
1881
|
# To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name.
|
1882
|
+
|
1747
1883
|
# @param batch_params [BatchParams] (required)
|
1748
1884
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1749
1885
|
# @return [Http::Response] the response
|
@@ -1772,8 +1908,8 @@ module Algolia
|
|
1772
1908
|
@api_client.call_api(:POST, path, new_options)
|
1773
1909
|
end
|
1774
1910
|
|
1775
|
-
# Batch write operations on multiple indices.
|
1776
1911
|
# To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name.
|
1912
|
+
|
1777
1913
|
# @param batch_params [BatchParams] (required)
|
1778
1914
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1779
1915
|
# @return [MultipleBatchResponse]
|
@@ -1782,8 +1918,10 @@ module Algolia
|
|
1782
1918
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::MultipleBatchResponse')
|
1783
1919
|
end
|
1784
1920
|
|
1785
|
-
# Copy, move, or rename an index.
|
1786
1921
|
# This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/).
|
1922
|
+
#
|
1923
|
+
# Required API Key ACLs:
|
1924
|
+
# - addObject
|
1787
1925
|
# @param index_name [String] Index on which to perform the request. (required)
|
1788
1926
|
# @param operation_index_params [OperationIndexParams] (required)
|
1789
1927
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1798,7 +1936,7 @@ module Algolia
|
|
1798
1936
|
raise ArgumentError, "Parameter `operation_index_params` is required when calling `operation_index`."
|
1799
1937
|
end
|
1800
1938
|
|
1801
|
-
path = '/1/indexes/{indexName}/operation'.sub('{' + 'indexName' + '}',
|
1939
|
+
path = '/1/indexes/{indexName}/operation'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
1802
1940
|
query_params = {}
|
1803
1941
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1804
1942
|
header_params = {}
|
@@ -1817,8 +1955,10 @@ module Algolia
|
|
1817
1955
|
@api_client.call_api(:POST, path, new_options)
|
1818
1956
|
end
|
1819
1957
|
|
1820
|
-
# Copy, move, or rename an index.
|
1821
1958
|
# This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn't exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/).
|
1959
|
+
#
|
1960
|
+
# Required API Key ACLs:
|
1961
|
+
# - addObject
|
1822
1962
|
# @param index_name [String] Index on which to perform the request. (required)
|
1823
1963
|
# @param operation_index_params [OperationIndexParams] (required)
|
1824
1964
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -1828,8 +1968,10 @@ module Algolia
|
|
1828
1968
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
1829
1969
|
end
|
1830
1970
|
|
1831
|
-
# Update record attributes.
|
1832
1971
|
# Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor.
|
1972
|
+
#
|
1973
|
+
# Required API Key ACLs:
|
1974
|
+
# - addObject
|
1833
1975
|
# @param index_name [String] Index on which to perform the request. (required)
|
1834
1976
|
# @param object_id [String] Unique record (object) identifier. (required)
|
1835
1977
|
# @param attributes_to_update [Hash<String, AttributeToUpdate>] Object with attributes to update. (required)
|
@@ -1850,8 +1992,8 @@ module Algolia
|
|
1850
1992
|
raise ArgumentError, "Parameter `attributes_to_update` is required when calling `partial_update_object`."
|
1851
1993
|
end
|
1852
1994
|
|
1853
|
-
path = '/1/indexes/{indexName}/{objectID}/partial'.sub('{' + 'indexName' + '}',
|
1854
|
-
|
1995
|
+
path = '/1/indexes/{indexName}/{objectID}/partial'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
1996
|
+
Transport.encode_uri(object_id.to_s))
|
1855
1997
|
query_params = {}
|
1856
1998
|
query_params[:createIfNotExists] = create_if_not_exists unless create_if_not_exists.nil?
|
1857
1999
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -1871,8 +2013,10 @@ module Algolia
|
|
1871
2013
|
@api_client.call_api(:POST, path, new_options)
|
1872
2014
|
end
|
1873
2015
|
|
1874
|
-
# Update record attributes.
|
1875
2016
|
# Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor.
|
2017
|
+
#
|
2018
|
+
# Required API Key ACLs:
|
2019
|
+
# - addObject
|
1876
2020
|
# @param index_name [String] Index on which to perform the request. (required)
|
1877
2021
|
# @param object_id [String] Unique record (object) identifier. (required)
|
1878
2022
|
# @param attributes_to_update [Hash<String, AttributeToUpdate>] Object with attributes to update. (required)
|
@@ -1884,8 +2028,10 @@ module Algolia
|
|
1884
2028
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtWithObjectIdResponse')
|
1885
2029
|
end
|
1886
2030
|
|
1887
|
-
# Remove userID.
|
1888
2031
|
# Remove a userID and its associated data from the multi-clusters.
|
2032
|
+
#
|
2033
|
+
# Required API Key ACLs:
|
2034
|
+
# - admin
|
1889
2035
|
# @param user_id [String] userID to assign. (required)
|
1890
2036
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1891
2037
|
# @return [Http::Response] the response
|
@@ -1900,7 +2046,7 @@ module Algolia
|
|
1900
2046
|
raise ArgumentError, "invalid value for 'user_id' when calling SearchClient.remove_user_id, must conform to the pattern #{pattern}."
|
1901
2047
|
end
|
1902
2048
|
|
1903
|
-
path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}',
|
2049
|
+
path = '/1/clusters/mapping/{userID}'.sub('{' + 'userID' + '}', Transport.encode_uri(user_id.to_s))
|
1904
2050
|
query_params = {}
|
1905
2051
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1906
2052
|
header_params = {}
|
@@ -1919,8 +2065,10 @@ module Algolia
|
|
1919
2065
|
@api_client.call_api(:DELETE, path, new_options)
|
1920
2066
|
end
|
1921
2067
|
|
1922
|
-
# Remove userID.
|
1923
2068
|
# Remove a userID and its associated data from the multi-clusters.
|
2069
|
+
#
|
2070
|
+
# Required API Key ACLs:
|
2071
|
+
# - admin
|
1924
2072
|
# @param user_id [String] userID to assign. (required)
|
1925
2073
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1926
2074
|
# @return [RemoveUserIdResponse]
|
@@ -1929,8 +2077,10 @@ module Algolia
|
|
1929
2077
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::RemoveUserIdResponse')
|
1930
2078
|
end
|
1931
2079
|
|
1932
|
-
# Replace all sources.
|
1933
2080
|
# Replace all allowed sources.
|
2081
|
+
#
|
2082
|
+
# Required API Key ACLs:
|
2083
|
+
# - admin
|
1934
2084
|
# @param source [Array<Source>] Allowed sources. (required)
|
1935
2085
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1936
2086
|
# @return [Http::Response] the response
|
@@ -1959,8 +2109,10 @@ module Algolia
|
|
1959
2109
|
@api_client.call_api(:PUT, path, new_options)
|
1960
2110
|
end
|
1961
2111
|
|
1962
|
-
# Replace all sources.
|
1963
2112
|
# Replace all allowed sources.
|
2113
|
+
#
|
2114
|
+
# Required API Key ACLs:
|
2115
|
+
# - admin
|
1964
2116
|
# @param source [Array<Source>] Allowed sources. (required)
|
1965
2117
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1966
2118
|
# @return [ReplaceSourceResponse]
|
@@ -1969,8 +2121,10 @@ module Algolia
|
|
1969
2121
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::ReplaceSourceResponse')
|
1970
2122
|
end
|
1971
2123
|
|
1972
|
-
# Restore API key.
|
1973
2124
|
# Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key.
|
2125
|
+
#
|
2126
|
+
# Required API Key ACLs:
|
2127
|
+
# - admin
|
1974
2128
|
# @param key [String] API key. (required)
|
1975
2129
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
1976
2130
|
# @return [Http::Response] the response
|
@@ -1980,7 +2134,7 @@ module Algolia
|
|
1980
2134
|
raise ArgumentError, "Parameter `key` is required when calling `restore_api_key`."
|
1981
2135
|
end
|
1982
2136
|
|
1983
|
-
path = '/1/keys/{key}/restore'.sub('{' + 'key' + '}',
|
2137
|
+
path = '/1/keys/{key}/restore'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
|
1984
2138
|
query_params = {}
|
1985
2139
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
1986
2140
|
header_params = {}
|
@@ -1999,8 +2153,10 @@ module Algolia
|
|
1999
2153
|
@api_client.call_api(:POST, path, new_options)
|
2000
2154
|
end
|
2001
2155
|
|
2002
|
-
# Restore API key.
|
2003
2156
|
# Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key.
|
2157
|
+
#
|
2158
|
+
# Required API Key ACLs:
|
2159
|
+
# - admin
|
2004
2160
|
# @param key [String] API key. (required)
|
2005
2161
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2006
2162
|
# @return [AddApiKeyResponse]
|
@@ -2009,8 +2165,10 @@ module Algolia
|
|
2009
2165
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::AddApiKeyResponse')
|
2010
2166
|
end
|
2011
2167
|
|
2012
|
-
# Add or update a record.
|
2013
2168
|
# Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
|
2169
|
+
#
|
2170
|
+
# Required API Key ACLs:
|
2171
|
+
# - addObject
|
2014
2172
|
# @param index_name [String] Index on which to perform the request. (required)
|
2015
2173
|
# @param body [Object] The Algolia record. (required)
|
2016
2174
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2025,7 +2183,7 @@ module Algolia
|
|
2025
2183
|
raise ArgumentError, "Parameter `body` is required when calling `save_object`."
|
2026
2184
|
end
|
2027
2185
|
|
2028
|
-
path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}',
|
2186
|
+
path = '/1/indexes/{indexName}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2029
2187
|
query_params = {}
|
2030
2188
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2031
2189
|
header_params = {}
|
@@ -2044,8 +2202,10 @@ module Algolia
|
|
2044
2202
|
@api_client.call_api(:POST, path, new_options)
|
2045
2203
|
end
|
2046
2204
|
|
2047
|
-
# Add or update a record.
|
2048
2205
|
# Add a record (object) to an index or replace it. If the record doesn't contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
|
2206
|
+
#
|
2207
|
+
# Required API Key ACLs:
|
2208
|
+
# - addObject
|
2049
2209
|
# @param index_name [String] Index on which to perform the request. (required)
|
2050
2210
|
# @param body [Object] The Algolia record. (required)
|
2051
2211
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2055,8 +2215,10 @@ module Algolia
|
|
2055
2215
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveObjectResponse')
|
2056
2216
|
end
|
2057
2217
|
|
2058
|
-
# Create or update a rule.
|
2059
2218
|
# To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
2219
|
+
#
|
2220
|
+
# Required API Key ACLs:
|
2221
|
+
# - editSettings
|
2060
2222
|
# @param index_name [String] Index on which to perform the request. (required)
|
2061
2223
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
2062
2224
|
# @param rule [Rule] (required)
|
@@ -2077,8 +2239,8 @@ module Algolia
|
|
2077
2239
|
raise ArgumentError, "Parameter `rule` is required when calling `save_rule`."
|
2078
2240
|
end
|
2079
2241
|
|
2080
|
-
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}',
|
2081
|
-
|
2242
|
+
path = '/1/indexes/{indexName}/rules/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
2243
|
+
Transport.encode_uri(object_id.to_s))
|
2082
2244
|
query_params = {}
|
2083
2245
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
2084
2246
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -2098,8 +2260,10 @@ module Algolia
|
|
2098
2260
|
@api_client.call_api(:PUT, path, new_options)
|
2099
2261
|
end
|
2100
2262
|
|
2101
|
-
# Create or update a rule.
|
2102
2263
|
# To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
2264
|
+
#
|
2265
|
+
# Required API Key ACLs:
|
2266
|
+
# - editSettings
|
2103
2267
|
# @param index_name [String] Index on which to perform the request. (required)
|
2104
2268
|
# @param object_id [String] Unique identifier of a rule object. (required)
|
2105
2269
|
# @param rule [Rule] (required)
|
@@ -2111,8 +2275,10 @@ module Algolia
|
|
2111
2275
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedRuleResponse')
|
2112
2276
|
end
|
2113
2277
|
|
2114
|
-
# Save a batch of rules.
|
2115
2278
|
# Create or update multiple rules.
|
2279
|
+
#
|
2280
|
+
# Required API Key ACLs:
|
2281
|
+
# - editSettings
|
2116
2282
|
# @param index_name [String] Index on which to perform the request. (required)
|
2117
2283
|
# @param rules [Array<Rule>] (required)
|
2118
2284
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2129,7 +2295,7 @@ module Algolia
|
|
2129
2295
|
raise ArgumentError, "Parameter `rules` is required when calling `save_rules`."
|
2130
2296
|
end
|
2131
2297
|
|
2132
|
-
path = '/1/indexes/{indexName}/rules/batch'.sub('{' + 'indexName' + '}',
|
2298
|
+
path = '/1/indexes/{indexName}/rules/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2133
2299
|
query_params = {}
|
2134
2300
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
2135
2301
|
query_params[:clearExistingRules] = clear_existing_rules unless clear_existing_rules.nil?
|
@@ -2150,8 +2316,10 @@ module Algolia
|
|
2150
2316
|
@api_client.call_api(:POST, path, new_options)
|
2151
2317
|
end
|
2152
2318
|
|
2153
|
-
# Save a batch of rules.
|
2154
2319
|
# Create or update multiple rules.
|
2320
|
+
#
|
2321
|
+
# Required API Key ACLs:
|
2322
|
+
# - editSettings
|
2155
2323
|
# @param index_name [String] Index on which to perform the request. (required)
|
2156
2324
|
# @param rules [Array<Rule>] (required)
|
2157
2325
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2163,8 +2331,10 @@ module Algolia
|
|
2163
2331
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2164
2332
|
end
|
2165
2333
|
|
2166
|
-
# Save a synonym.
|
2167
2334
|
# Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
|
2335
|
+
#
|
2336
|
+
# Required API Key ACLs:
|
2337
|
+
# - editSettings
|
2168
2338
|
# @param index_name [String] Index on which to perform the request. (required)
|
2169
2339
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
2170
2340
|
# @param synonym_hit [SynonymHit] (required)
|
@@ -2185,8 +2355,8 @@ module Algolia
|
|
2185
2355
|
raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonym`."
|
2186
2356
|
end
|
2187
2357
|
|
2188
|
-
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}',
|
2189
|
-
|
2358
|
+
path = '/1/indexes/{indexName}/synonyms/{objectID}'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'objectID' + '}',
|
2359
|
+
Transport.encode_uri(object_id.to_s))
|
2190
2360
|
query_params = {}
|
2191
2361
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
2192
2362
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -2206,8 +2376,10 @@ module Algolia
|
|
2206
2376
|
@api_client.call_api(:PUT, path, new_options)
|
2207
2377
|
end
|
2208
2378
|
|
2209
|
-
# Save a synonym.
|
2210
2379
|
# Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
|
2380
|
+
#
|
2381
|
+
# Required API Key ACLs:
|
2382
|
+
# - editSettings
|
2211
2383
|
# @param index_name [String] Index on which to perform the request. (required)
|
2212
2384
|
# @param object_id [String] Unique identifier of a synonym object. (required)
|
2213
2385
|
# @param synonym_hit [SynonymHit] (required)
|
@@ -2219,8 +2391,10 @@ module Algolia
|
|
2219
2391
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SaveSynonymResponse')
|
2220
2392
|
end
|
2221
2393
|
|
2222
|
-
# Save a batch of synonyms.
|
2223
2394
|
# Create or update multiple synonyms.
|
2395
|
+
#
|
2396
|
+
# Required API Key ACLs:
|
2397
|
+
# - editSettings
|
2224
2398
|
# @param index_name [String] Index on which to perform the request. (required)
|
2225
2399
|
# @param synonym_hit [Array<SynonymHit>] (required)
|
2226
2400
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2237,7 +2411,7 @@ module Algolia
|
|
2237
2411
|
raise ArgumentError, "Parameter `synonym_hit` is required when calling `save_synonyms`."
|
2238
2412
|
end
|
2239
2413
|
|
2240
|
-
path = '/1/indexes/{indexName}/synonyms/batch'.sub('{' + 'indexName' + '}',
|
2414
|
+
path = '/1/indexes/{indexName}/synonyms/batch'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2241
2415
|
query_params = {}
|
2242
2416
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
2243
2417
|
query_params[:replaceExistingSynonyms] = replace_existing_synonyms unless replace_existing_synonyms.nil?
|
@@ -2258,8 +2432,10 @@ module Algolia
|
|
2258
2432
|
@api_client.call_api(:POST, path, new_options)
|
2259
2433
|
end
|
2260
2434
|
|
2261
|
-
# Save a batch of synonyms.
|
2262
2435
|
# Create or update multiple synonyms.
|
2436
|
+
#
|
2437
|
+
# Required API Key ACLs:
|
2438
|
+
# - editSettings
|
2263
2439
|
# @param index_name [String] Index on which to perform the request. (required)
|
2264
2440
|
# @param synonym_hit [Array<SynonymHit>] (required)
|
2265
2441
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2271,8 +2447,10 @@ module Algolia
|
|
2271
2447
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2272
2448
|
end
|
2273
2449
|
|
2274
|
-
# Search multiple indices.
|
2275
2450
|
# Send multiple search queries to one or more indices.
|
2451
|
+
#
|
2452
|
+
# Required API Key ACLs:
|
2453
|
+
# - search
|
2276
2454
|
# @param search_method_params [SearchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. (required)
|
2277
2455
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2278
2456
|
# @return [Http::Response] the response
|
@@ -2301,8 +2479,10 @@ module Algolia
|
|
2301
2479
|
@api_client.call_api(:POST, path, new_options)
|
2302
2480
|
end
|
2303
2481
|
|
2304
|
-
# Search multiple indices.
|
2305
2482
|
# Send multiple search queries to one or more indices.
|
2483
|
+
#
|
2484
|
+
# Required API Key ACLs:
|
2485
|
+
# - search
|
2306
2486
|
# @param search_method_params [SearchMethodParams] Query requests and strategies. Results will be received in the same order as the queries. (required)
|
2307
2487
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2308
2488
|
# @return [SearchResponses]
|
@@ -2311,8 +2491,10 @@ module Algolia
|
|
2311
2491
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponses')
|
2312
2492
|
end
|
2313
2493
|
|
2314
|
-
# Search dictionary entries.
|
2315
2494
|
# Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries.
|
2495
|
+
#
|
2496
|
+
# Required API Key ACLs:
|
2497
|
+
# - settings
|
2316
2498
|
# @param dictionary_name [DictionaryType] Dictionary to search in. (required)
|
2317
2499
|
# @param search_dictionary_entries_params [SearchDictionaryEntriesParams] (required)
|
2318
2500
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2327,7 +2509,7 @@ module Algolia
|
|
2327
2509
|
raise ArgumentError, "Parameter `search_dictionary_entries_params` is required when calling `search_dictionary_entries`."
|
2328
2510
|
end
|
2329
2511
|
|
2330
|
-
path = '/1/dictionaries/{dictionaryName}/search'.sub('{' + 'dictionaryName' + '}',
|
2512
|
+
path = '/1/dictionaries/{dictionaryName}/search'.sub('{' + 'dictionaryName' + '}', Transport.encode_uri(dictionary_name.to_s))
|
2331
2513
|
query_params = {}
|
2332
2514
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2333
2515
|
header_params = {}
|
@@ -2346,8 +2528,10 @@ module Algolia
|
|
2346
2528
|
@api_client.call_api(:POST, path, new_options)
|
2347
2529
|
end
|
2348
2530
|
|
2349
|
-
# Search dictionary entries.
|
2350
2531
|
# Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries.
|
2532
|
+
#
|
2533
|
+
# Required API Key ACLs:
|
2534
|
+
# - settings
|
2351
2535
|
# @param dictionary_name [DictionaryType] Dictionary to search in. (required)
|
2352
2536
|
# @param search_dictionary_entries_params [SearchDictionaryEntriesParams] (required)
|
2353
2537
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2357,8 +2541,10 @@ module Algolia
|
|
2357
2541
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2358
2542
|
end
|
2359
2543
|
|
2360
|
-
# Search for facet values.
|
2361
2544
|
# [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`.
|
2545
|
+
#
|
2546
|
+
# Required API Key ACLs:
|
2547
|
+
# - search
|
2362
2548
|
# @param index_name [String] Index on which to perform the request. (required)
|
2363
2549
|
# @param facet_name [String] Facet name. (required)
|
2364
2550
|
# @param search_for_facet_values_request [SearchForFacetValuesRequest]
|
@@ -2374,8 +2560,8 @@ module Algolia
|
|
2374
2560
|
raise ArgumentError, "Parameter `facet_name` is required when calling `search_for_facet_values`."
|
2375
2561
|
end
|
2376
2562
|
|
2377
|
-
path = '/1/indexes/{indexName}/facets/{facetName}/query'.sub('{' + 'indexName' + '}',
|
2378
|
-
|
2563
|
+
path = '/1/indexes/{indexName}/facets/{facetName}/query'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s)).sub('{' + 'facetName' + '}',
|
2564
|
+
Transport.encode_uri(facet_name.to_s))
|
2379
2565
|
query_params = {}
|
2380
2566
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2381
2567
|
header_params = {}
|
@@ -2394,8 +2580,10 @@ module Algolia
|
|
2394
2580
|
@api_client.call_api(:POST, path, new_options)
|
2395
2581
|
end
|
2396
2582
|
|
2397
|
-
# Search for facet values.
|
2398
2583
|
# [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn't supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`.
|
2584
|
+
#
|
2585
|
+
# Required API Key ACLs:
|
2586
|
+
# - search
|
2399
2587
|
# @param index_name [String] Index on which to perform the request. (required)
|
2400
2588
|
# @param facet_name [String] Facet name. (required)
|
2401
2589
|
# @param search_for_facet_values_request [SearchForFacetValuesRequest]
|
@@ -2406,8 +2594,10 @@ module Algolia
|
|
2406
2594
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchForFacetValuesResponse')
|
2407
2595
|
end
|
2408
2596
|
|
2409
|
-
# Search for rules.
|
2410
2597
|
# Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body.
|
2598
|
+
#
|
2599
|
+
# Required API Key ACLs:
|
2600
|
+
# - settings
|
2411
2601
|
# @param index_name [String] Index on which to perform the request. (required)
|
2412
2602
|
# @param search_rules_params [SearchRulesParams]
|
2413
2603
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2418,7 +2608,7 @@ module Algolia
|
|
2418
2608
|
raise ArgumentError, "Parameter `index_name` is required when calling `search_rules`."
|
2419
2609
|
end
|
2420
2610
|
|
2421
|
-
path = '/1/indexes/{indexName}/rules/search'.sub('{' + 'indexName' + '}',
|
2611
|
+
path = '/1/indexes/{indexName}/rules/search'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2422
2612
|
query_params = {}
|
2423
2613
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2424
2614
|
header_params = {}
|
@@ -2437,8 +2627,10 @@ module Algolia
|
|
2437
2627
|
@api_client.call_api(:POST, path, new_options)
|
2438
2628
|
end
|
2439
2629
|
|
2440
|
-
# Search for rules.
|
2441
2630
|
# Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body.
|
2631
|
+
#
|
2632
|
+
# Required API Key ACLs:
|
2633
|
+
# - settings
|
2442
2634
|
# @param index_name [String] Index on which to perform the request. (required)
|
2443
2635
|
# @param search_rules_params [SearchRulesParams]
|
2444
2636
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2448,8 +2640,10 @@ module Algolia
|
|
2448
2640
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchRulesResponse')
|
2449
2641
|
end
|
2450
2642
|
|
2451
|
-
# Search an index.
|
2452
2643
|
# Return records that match the query.
|
2644
|
+
#
|
2645
|
+
# Required API Key ACLs:
|
2646
|
+
# - search
|
2453
2647
|
# @param index_name [String] Index on which to perform the request. (required)
|
2454
2648
|
# @param search_params [SearchParams]
|
2455
2649
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2460,7 +2654,7 @@ module Algolia
|
|
2460
2654
|
raise ArgumentError, "Parameter `index_name` is required when calling `search_single_index`."
|
2461
2655
|
end
|
2462
2656
|
|
2463
|
-
path = '/1/indexes/{indexName}/query'.sub('{' + 'indexName' + '}',
|
2657
|
+
path = '/1/indexes/{indexName}/query'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2464
2658
|
query_params = {}
|
2465
2659
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2466
2660
|
header_params = {}
|
@@ -2479,8 +2673,10 @@ module Algolia
|
|
2479
2673
|
@api_client.call_api(:POST, path, new_options)
|
2480
2674
|
end
|
2481
2675
|
|
2482
|
-
# Search an index.
|
2483
2676
|
# Return records that match the query.
|
2677
|
+
#
|
2678
|
+
# Required API Key ACLs:
|
2679
|
+
# - search
|
2484
2680
|
# @param index_name [String] Index on which to perform the request. (required)
|
2485
2681
|
# @param search_params [SearchParams]
|
2486
2682
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2490,8 +2686,10 @@ module Algolia
|
|
2490
2686
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchResponse')
|
2491
2687
|
end
|
2492
2688
|
|
2493
|
-
# Search for synonyms.
|
2494
2689
|
# Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
|
2690
|
+
#
|
2691
|
+
# Required API Key ACLs:
|
2692
|
+
# - settings
|
2495
2693
|
# @param index_name [String] Index on which to perform the request. (required)
|
2496
2694
|
# @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation.
|
2497
2695
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2502,7 +2700,7 @@ module Algolia
|
|
2502
2700
|
raise ArgumentError, "Parameter `index_name` is required when calling `search_synonyms`."
|
2503
2701
|
end
|
2504
2702
|
|
2505
|
-
path = '/1/indexes/{indexName}/synonyms/search'.sub('{' + 'indexName' + '}',
|
2703
|
+
path = '/1/indexes/{indexName}/synonyms/search'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2506
2704
|
query_params = {}
|
2507
2705
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2508
2706
|
header_params = {}
|
@@ -2521,8 +2719,10 @@ module Algolia
|
|
2521
2719
|
@api_client.call_api(:POST, path, new_options)
|
2522
2720
|
end
|
2523
2721
|
|
2524
|
-
# Search for synonyms.
|
2525
2722
|
# Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
|
2723
|
+
#
|
2724
|
+
# Required API Key ACLs:
|
2725
|
+
# - settings
|
2526
2726
|
# @param index_name [String] Index on which to perform the request. (required)
|
2527
2727
|
# @param search_synonyms_params [SearchSynonymsParams] Body of the `searchSynonyms` operation.
|
2528
2728
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2532,8 +2732,10 @@ module Algolia
|
|
2532
2732
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchSynonymsResponse')
|
2533
2733
|
end
|
2534
2734
|
|
2535
|
-
# Search for a user ID.
|
2536
2735
|
# Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
2736
|
+
#
|
2737
|
+
# Required API Key ACLs:
|
2738
|
+
# - admin
|
2537
2739
|
# @param search_user_ids_params [SearchUserIdsParams] (required)
|
2538
2740
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2539
2741
|
# @return [Http::Response] the response
|
@@ -2562,8 +2764,10 @@ module Algolia
|
|
2562
2764
|
@api_client.call_api(:POST, path, new_options)
|
2563
2765
|
end
|
2564
2766
|
|
2565
|
-
# Search for a user ID.
|
2566
2767
|
# Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
2768
|
+
#
|
2769
|
+
# Required API Key ACLs:
|
2770
|
+
# - admin
|
2567
2771
|
# @param search_user_ids_params [SearchUserIdsParams] (required)
|
2568
2772
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2569
2773
|
# @return [SearchUserIdsResponse]
|
@@ -2572,8 +2776,10 @@ module Algolia
|
|
2572
2776
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::SearchUserIdsResponse')
|
2573
2777
|
end
|
2574
2778
|
|
2575
|
-
# Set stop word settings.
|
2576
2779
|
# Set stop word settings for a specific language.
|
2780
|
+
#
|
2781
|
+
# Required API Key ACLs:
|
2782
|
+
# - editSettings
|
2577
2783
|
# @param dictionary_settings_params [DictionarySettingsParams] (required)
|
2578
2784
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2579
2785
|
# @return [Http::Response] the response
|
@@ -2602,8 +2808,10 @@ module Algolia
|
|
2602
2808
|
@api_client.call_api(:PUT, path, new_options)
|
2603
2809
|
end
|
2604
2810
|
|
2605
|
-
# Set stop word settings.
|
2606
2811
|
# Set stop word settings for a specific language.
|
2812
|
+
#
|
2813
|
+
# Required API Key ACLs:
|
2814
|
+
# - editSettings
|
2607
2815
|
# @param dictionary_settings_params [DictionarySettingsParams] (required)
|
2608
2816
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
2609
2817
|
# @return [UpdatedAtResponse]
|
@@ -2612,8 +2820,10 @@ module Algolia
|
|
2612
2820
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2613
2821
|
end
|
2614
2822
|
|
2615
|
-
# Update index settings.
|
2616
2823
|
# Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value.
|
2824
|
+
#
|
2825
|
+
# Required API Key ACLs:
|
2826
|
+
# - editSettings
|
2617
2827
|
# @param index_name [String] Index on which to perform the request. (required)
|
2618
2828
|
# @param index_settings [IndexSettings] (required)
|
2619
2829
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2629,7 +2839,7 @@ module Algolia
|
|
2629
2839
|
raise ArgumentError, "Parameter `index_settings` is required when calling `set_settings`."
|
2630
2840
|
end
|
2631
2841
|
|
2632
|
-
path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}',
|
2842
|
+
path = '/1/indexes/{indexName}/settings'.sub('{' + 'indexName' + '}', Transport.encode_uri(index_name.to_s))
|
2633
2843
|
query_params = {}
|
2634
2844
|
query_params[:forwardToReplicas] = forward_to_replicas unless forward_to_replicas.nil?
|
2635
2845
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
@@ -2649,8 +2859,10 @@ module Algolia
|
|
2649
2859
|
@api_client.call_api(:PUT, path, new_options)
|
2650
2860
|
end
|
2651
2861
|
|
2652
|
-
# Update index settings.
|
2653
2862
|
# Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value.
|
2863
|
+
#
|
2864
|
+
# Required API Key ACLs:
|
2865
|
+
# - editSettings
|
2654
2866
|
# @param index_name [String] Index on which to perform the request. (required)
|
2655
2867
|
# @param index_settings [IndexSettings] (required)
|
2656
2868
|
# @param forward_to_replicas [Boolean] Indicates whether changed index settings are forwarded to the replica indices.
|
@@ -2661,8 +2873,10 @@ module Algolia
|
|
2661
2873
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || 'Search::UpdatedAtResponse')
|
2662
2874
|
end
|
2663
2875
|
|
2664
|
-
# Update an API key.
|
2665
2876
|
# Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key.
|
2877
|
+
#
|
2878
|
+
# Required API Key ACLs:
|
2879
|
+
# - admin
|
2666
2880
|
# @param key [String] API key. (required)
|
2667
2881
|
# @param api_key [ApiKey] (required)
|
2668
2882
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2677,7 +2891,7 @@ module Algolia
|
|
2677
2891
|
raise ArgumentError, "Parameter `api_key` is required when calling `update_api_key`."
|
2678
2892
|
end
|
2679
2893
|
|
2680
|
-
path = '/1/keys/{key}'.sub('{' + 'key' + '}',
|
2894
|
+
path = '/1/keys/{key}'.sub('{' + 'key' + '}', Transport.encode_uri(key.to_s))
|
2681
2895
|
query_params = {}
|
2682
2896
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2683
2897
|
header_params = {}
|
@@ -2696,8 +2910,10 @@ module Algolia
|
|
2696
2910
|
@api_client.call_api(:PUT, path, new_options)
|
2697
2911
|
end
|
2698
2912
|
|
2699
|
-
# Update an API key.
|
2700
2913
|
# Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key.
|
2914
|
+
#
|
2915
|
+
# Required API Key ACLs:
|
2916
|
+
# - admin
|
2701
2917
|
# @param key [String] API key. (required)
|
2702
2918
|
# @param api_key [ApiKey] (required)
|
2703
2919
|
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
@@ -2776,5 +2992,77 @@ module Algolia
|
|
2776
2992
|
end
|
2777
2993
|
raise ApiError, "The maximum number of retries exceeded. (#{max_retries})"
|
2778
2994
|
end
|
2995
|
+
|
2996
|
+
# Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
2997
|
+
#
|
2998
|
+
# @param index_name [String] the `index_name` to browse. (required)
|
2999
|
+
# @param browse_params [BrowseParamsObject] the `browse_params` to send along with the query, they will be forwarded to the `browse` method.
|
3000
|
+
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `browse` method.
|
3001
|
+
# @param block [Proc] the block to execute on each object of the index.
|
3002
|
+
def browse_objects(index_name, browse_params = Search::BrowseParamsObject.new, request_options = {}, &block)
|
3003
|
+
hits = []
|
3004
|
+
loop do
|
3005
|
+
res = browse(index_name, browse_params, request_options)
|
3006
|
+
if block_given?
|
3007
|
+
res.hits.each do |hit|
|
3008
|
+
block.call(hit)
|
3009
|
+
end
|
3010
|
+
else
|
3011
|
+
hits.concat(res.hits)
|
3012
|
+
end
|
3013
|
+
browse_params.cursor = res.cursor
|
3014
|
+
break if browse_params.cursor.nil?
|
3015
|
+
end
|
3016
|
+
|
3017
|
+
hits unless block_given?
|
3018
|
+
end
|
3019
|
+
|
3020
|
+
# Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
3021
|
+
#
|
3022
|
+
# @param index_name [String] the `index_name` to browse rules from. (required)
|
3023
|
+
# @param search_rules_params [SearchRulesParams] the parameters to send along with the query, they will be forwarded to the `searchRules` method.
|
3024
|
+
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `searchRules` method.
|
3025
|
+
# @param block [Proc] the block to execute on each rule of the index.
|
3026
|
+
def browse_rules(index_name, search_rules_params = Search::SearchRulesParams.new(hits_per_page: 1000, page: 0), request_options = {}, &block)
|
3027
|
+
rules = []
|
3028
|
+
loop do
|
3029
|
+
res = search_rules(index_name, search_rules_params, request_options)
|
3030
|
+
if block_given?
|
3031
|
+
res.hits.each do |rule|
|
3032
|
+
block.call(rule)
|
3033
|
+
end
|
3034
|
+
else
|
3035
|
+
rules.concat(res.hits)
|
3036
|
+
end
|
3037
|
+
search_rules_params.page += 1
|
3038
|
+
break if res.nb_hits < search_rules_params.hits_per_page
|
3039
|
+
end
|
3040
|
+
|
3041
|
+
rules unless block_given?
|
3042
|
+
end
|
3043
|
+
|
3044
|
+
# Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating synonyms of an index.
|
3045
|
+
#
|
3046
|
+
# @param index_name [String] the `index_name` to browse synonyms from. (required)
|
3047
|
+
# @param search_synonyms_params [SearchSynonymsParams] the parameters to send along with the query, they will be forwarded to the `searchSynonyms` method.
|
3048
|
+
# @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method.
|
3049
|
+
# @param block [Proc] the block to execute on each synonym of the index.
|
3050
|
+
def browse_synonyms(index_name, search_synonyms_params = Search::SearchSynonymsParams.new(hits_per_page: 1000, page: 0), request_options = {}, &block)
|
3051
|
+
synonyms = []
|
3052
|
+
loop do
|
3053
|
+
res = search_synonyms(index_name, search_synonyms_params, request_options)
|
3054
|
+
if block_given?
|
3055
|
+
res.hits.each do |synonym|
|
3056
|
+
block.call(synonym)
|
3057
|
+
end
|
3058
|
+
else
|
3059
|
+
synonyms.concat(res.hits)
|
3060
|
+
end
|
3061
|
+
search_synonyms_params.page += 1
|
3062
|
+
break if res.nb_hits < search_synonyms_params.hits_per_page
|
3063
|
+
end
|
3064
|
+
|
3065
|
+
synonyms unless block_given?
|
3066
|
+
end
|
2779
3067
|
end
|
2780
3068
|
end
|