/**
* Deletes a content object from the index
*
* @param int $contentId
* @param int|null $versionId
*
* @return void
*/
public function deleteContent($contentId, $versionId = null)
{
if ($versionId === null) {
$ast = array("query" => array("filtered" => array("filter" => array("and" => array(array("ids" => array("type" => $this->documentTypeName, "values" => array($contentId))))))));
$this->gateway->deleteByQuery(json_encode($ast), "content");
} else {
$this->gateway->delete($contentId, "content");
}
}