deleteObject() public method

Delete an object from the index.
public deleteObject ( integer | string $objectID ) : mixed
$objectID integer | string the unique identifier of object to delete
return mixed
Exemplo n.º 1
0
 /**
  * Remove an item from the search index by type and id.
  *
  * @param string $type
  * @param int    $id
  */
 public function removeFromIndexByTypeAndId($type, $id)
 {
     $this->index->deleteObject($type . '-' . $id);
 }
Exemplo n.º 2
0
 public function it_removes_an_object_from_the_index_by_type_and_id(\AlgoliaSearch\Index $index)
 {
     $index->deleteObject($this->searchableType . '-' . $this->searchableId)->shouldBeCalled();
     $this->removeFromIndexByTypeAndId($this->searchableType, $this->searchableId);
 }