public function deleteContent($contentId, $versionId = null)
    {
        // 1. Delete the Content
        if ($versionId === null) {
            $this->gateway->deleteByQuery(json_encode(['query' => ['match' => ['_id' => $contentId]]]), $this->contentDocumentTypeIdentifier);
        } else {
            $this->gateway->delete($contentId, $this->contentDocumentTypeIdentifier);
        }

        // 2. Delete all Content's Locations
        $this->gateway->deleteByQuery(json_encode(['query' => ['match' => ['content_id_id' => $contentId]]]), $this->locationDocumentTypeIdentifier);
    }
public function deleteContent($contentId, $versionId = null)
    {
        // 1. Delete the Content
        if ($versionId === null) {
            $this->gateway->deleteByQuery(json_encode(['query' => ['match' => ['_id' => $contentId]]]), $this->contentDocumentTypeIdentifier);
        } else {
            $this->gateway->delete($contentId, $this->contentDocumentTypeIdentifier);
        }

        // 2. Delete all Content's Locations
        $this->gateway->deleteByQuery(json_encode(['query' => ['match' => ['content_id_id' => $contentId]]]), $this->locationDocumentTypeIdentifier);
    }
public function deleteContent ( $ contentId , $ versionId = null ) { // 1. Delete the Content if ( $ versionId === null ) { $ this -> gateway -> deleteByQuery ( json_encode ( [ 'query' => [ 'match' => [ '_id' => $ contentId ] ] ] ) , $ this -> contentDocumentTypeIdentifier ) ; } else { $ this -> gateway -> delete ( $ contentId , $ this -> contentDocumentTypeIdentifier ) ; } // 2. Delete all Content's Locations $ this -> gateway -> deleteByQuery ( json_encode ( [ 'query' => [ 'match' => [ 'content_id_id' => $ contentId ] ] ] ) , $ this -> locationDocumentTypeIdentifier ) ; }
Deletes a content object from the index.

@param int $contentId
@param int|null $versionId
Deletes a content object from the index .