public function deleteObject($objectID)
{
if ($objectID == null || mb_strlen($objectID) == 0) {
throw new \Exception('objectID is mandatory');
}
return $this->client->request($this->context, 'DELETE', '/1/indexes/' . $this->urlIndexName . '/' . urlencode($objectID), null, null, $this->context->writeHostsArray, $this->context->connectTimeout, $this->context->readTimeout);
}
/** * Remove an item from the search index by type and id. * * @param string $type * @param int $id */ public function removeFromIndexByTypeAndId($type, $id) { $this->index->deleteObject($type . '-' . $id); }