You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/php/api.mustache
+53-21Lines changed: 53 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -410,12 +410,12 @@ use {{invokerPackage}}\Support\Helpers;
410
410
/**
411
411
* Helper: Replace all objects in an index using a temporary one.
412
412
*
413
-
* @param string $indexName Index name
414
-
* @param array $objects Objects to index
413
+
* @param string $indexName The `indexName` to replace `objects` in.
414
+
* @param array $objects The array of `objects` to store in the given Algolia `indexName`.
415
+
* @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.
415
416
* @param array $requestOptions Request options
416
-
*
417
417
*/
418
-
public function replaceAllObjects($indexName, $objects, $requestOptions = [])
418
+
public function replaceAllObjects($indexName, $objects, $batchSize = 1000, $requestOptions = [])
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
453
+
*
454
+
* @param string $indexName The `indexName` to replace `objects` in.
455
+
* @param array $objects The array of `objects` to store in the given Algolia `indexName`.
456
+
* @param array $action The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
457
+
* @param array $waitForTasks Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
458
+
* @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.
0 commit comments