CodeExplorer ElasticsearchEntitySearcherSearchEvent example
if (!
$this->helper->
allowSearch($definition,
$context,
$criteria)) { return $this->decorated->
search($definition,
$criteria,
$context);
} if ($criteria->
getLimit() === 0
) { return new IdSearchResult(0,
[],
$criteria,
$context);
} $search =
$this->
createSearch($criteria,
$definition,
$context);
$this->eventDispatcher->
dispatch( new ElasticsearchEntitySearcherSearchEvent( $search,
$definition,
$criteria,
$context ) );
$search =
$this->
convertSearch($criteria,
$definition,
$context,
$search);
try { $result =
$this->client->
search([