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
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -487,30 +487,32 @@ use Algolia\AlgoliaSearch\Exceptions\NotFoundException;
487
487
*
488
488
* @param string $indexName The `indexName` to replace `objects` in.
489
489
* @param array $objects The array of `objects` to store in the given Algolia `indexName`.
490
+
* @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.
490
491
* @param array $requestOptions Request options
491
492
* @param bool $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
492
493
*/
493
-
public function saveObjects($indexName, $objects, $requestOptions = [], $waitForTasks = false) {
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
499
500
*
500
501
* @param string $indexName The `indexName` to delete `objectIDs` from.
501
502
* @param array $objectIDs The `objectIDs` to delete.
503
+
* @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.
502
504
* @param array $requestOptions Request options
503
505
* @param bool $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
504
506
*/
505
-
public function deleteObjects($indexName, $objectIDs, $requestOptions = [], $waitForTasks = false)
507
+
public function deleteObjects($indexName, $objectIDs, $batchSize = 1000, $requestOptions = [], $waitForTasks = false)
@@ -519,11 +521,12 @@ use Algolia\AlgoliaSearch\Exceptions\NotFoundException;
519
521
* @param string $indexName The `indexName` to replace `objects` in.
520
522
* @param array $objects The array of `objects` to store in the given Algolia `indexName`.
521
523
* @param bool $createIfNotExists To be provided if non-existing objects are passed, otherwise, the call will fail..
524
+
* @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.
522
525
* @param array $requestOptions Request options
523
526
* @param bool $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
524
527
*/
525
-
public function partialUpdateObjects($indexName, $objects, $createIfNotExists, $requestOptions = [], $waitForTasks = false) {
0 commit comments