AlgoliaSearch\Index::partialUpdateObjects PHP Method

partialUpdateObjects() public method

Partially Override the content of several objects.
public partialUpdateObjects ( array $objects, string $objectIDKey = 'objectID', boolean $createIfNotExists = true ) : mixed
$objects array contains an array of objects to update (each object must contains a objectID attribute)
$objectIDKey string
$createIfNotExists boolean
return mixed
    public function partialUpdateObjects($objects, $objectIDKey = 'objectID', $createIfNotExists = true)
    {
        if ($createIfNotExists) {
            $requests = $this->buildBatch('partialUpdateObject', $objects, true, $objectIDKey);
        } else {
            $requests = $this->buildBatch('partialUpdateObjectNoCreate', $objects, true, $objectIDKey);
        }
        return $this->batch($requests);
    }