public function clearIndex() { return $this->client->request($this->context, 'POST', '/1/indexes/' . $this->urlIndexName . '/clear', null, null, $this->context->writeHostsArray, $this->context->connectTimeout, $this->context->readTimeout); }
/** * {@inheritDoc} */ public function synchronize(array $documents) { if ($this->clearOnSync) { $this->index->clearIndex(); } $this->index->addObjects($documents); }