Newscoop\Search\Indexer::delete PHP Method

delete() public method

Delete event listener
public delete ( $event ) : void
return void
    public function delete($event)
    {
        if ($this->service->isIndexed($event['entity'])) {
            foreach ($this->indexClients as $client) {
                $client->delete($this->service->getDocumentId($event['entity']));
                $client->flush();
            }
        }
    }