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
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
615
+
*
616
+
* @param string $indexName the `indexName` to replace `objects` in
617
+
* @param array $objects the array of `objects` to store in the given Algolia `indexName`
618
+
* @param array $action the `batch` `action` to perform on the given array of `objects`, defaults to `addObject`
619
+
* @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
620
+
* @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.
621
+
* @param array $referenceIndexName This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).
622
+
* @param array $requestOptions Request options
623
+
*/
624
+
public function chunkedPush(
625
+
$indexName,
626
+
$objects,
627
+
$action = 'addObject',
628
+
$waitForTasks = true,
629
+
$referenceIndexName = null,
630
+
$batchSize = 1000,
631
+
$requestOptions = []
632
+
) {
614
633
if (null ==$this->ingestionTransporter) {
615
634
throw new \InvalidArgumentException('`setTransformationRegion` must have been called before calling this method.');
0 commit comments