Exemplo n.º 1
0
 /**
  * Deletes a location from the index.
  *
  * @param mixed $locationId
  * @param mixed $contentId
  */
 public function deleteLocation($locationId, $contentId)
 {
     $this->gateway->deleteByQuery("content_id:{$contentId}");
     // TODO it seems this part of location deletion (not last location) misses integration tests
     try {
         $contentInfo = $this->contentHandler->loadContentInfo($contentId);
     } catch (NotFoundException $e) {
         return;
     }
     $content = $this->contentHandler->load($contentId, $contentInfo->currentVersionNo);
     $this->bulkIndexContent(array($content));
 }
Exemplo n.º 2
0
 /**
  * Deletes a Content from the index storage
  *
  * @param int|string $contentId
  */
 public function deleteContent($contentId)
 {
     $this->gateway->deleteByQuery("content_id_id:{$contentId}");
 }