code: public function deleteContent($contentId, $versionId = null)
      {
          $idPrefix = $this->mapper->generateContentDocumentId($contentId);
  
          $this->gateway->deleteByQuery("_root_:{$idPrefix}*");
      }
docs: Deletes a content object from the index.
  
  @param int $contentId
  @param int|null $versionId