public function remove($contentId, $versionId = null)
{
$doDelete = false;
$this->dbHandler->beginTransaction();
// fetch all the words and decrease the object count on all the words
$wordIDList = $this->searchIndex->getContentObjectWords($contentId);
if (count($wordIDList) > 0) {
$this->searchIndex->decrementWordObjectCount($wordIDList);
$doDelete = true;
}
if ($doDelete) {
$this->searchIndex->deleteWordsWithoutObjects();
$this->searchIndex->deleteObjectWordsLink($contentId);
}
$this->dbHandler->commit();
return true;
}