public function addObjects($objects, $index_name) { $this->handleTooBigRecords($objects, $index_name); $index = $this->getIndex($index_name); if ($this->config->isPartialUpdateEnabled()) { $index->partialUpdateObjects($objects); } else { $index->addObjects($objects); } }