Skip to content

Commit 1ff6e82

Browse files
algolia-botmillotp
andcommitted
feat(clients): add optionnal scopes to replaceAllObjects [skip-bc] (generated)
algolia/api-clients-automation#4296 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 3973ab6 commit 1ff6e82

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Api/SearchClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,8 +2891,9 @@ public function browseSynonyms($indexName, $requestOptions = [])
28912891
* @param array $objects the array of `objects` to store in the given Algolia `indexName`
28922892
* @param array $batchSize The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
28932893
* @param array $requestOptions Request options
2894+
* @param mixed $scopes
28942895
*/
2895-
public function replaceAllObjects($indexName, $objects, $batchSize = 1000, $requestOptions = [])
2896+
public function replaceAllObjects($indexName, $objects, $batchSize = 1000, $scopes = ['settings', 'rules', 'synonyms'], $requestOptions = [])
28962897
{
28972898
$tmpIndexName = $indexName.'_tmp_'.rand(10000000, 99999999);
28982899

@@ -2902,7 +2903,7 @@ public function replaceAllObjects($indexName, $objects, $batchSize = 1000, $requ
29022903
[
29032904
'operation' => 'copy',
29042905
'destination' => $tmpIndexName,
2905-
'scope' => ['settings', 'rules', 'synonyms'],
2906+
'scope' => $scopes,
29062907
],
29072908
$requestOptions
29082909
);
@@ -2916,7 +2917,7 @@ public function replaceAllObjects($indexName, $objects, $batchSize = 1000, $requ
29162917
[
29172918
'operation' => 'copy',
29182919
'destination' => $tmpIndexName,
2919-
'scope' => ['settings', 'rules', 'synonyms'],
2920+
'scope' => $scopes,
29202921
],
29212922
$requestOptions
29222923
);

0 commit comments

Comments
 (0)