/**
  * Remove the given subject from the search index
  *
  * @param Searchable $subject
  */
 public function removeFromIndex(Searchable $subject)
 {
     $this->elasticsearch->delete(['index' => $this->indexName, 'type' => $subject->getSearchableType(), 'id' => $subject->getSearchableId()]);
 }
Пример #2
0
 /**
  * Remove an item from the search index by type and id.
  *
  * @param string $type
  * @param int    $id
  */
 public function removeFromIndexByTypeAndId($type, $id)
 {
     $this->elasticsearch->delete(['index' => $this->indexName, 'type' => $type, 'id' => $id]);
 }