CodeExplorer MatchAllQuery example
/**
* {@inheritdoc}
*/
public function handle( CriteriaPartInterface
$criteriaPart,
Criteria
$criteria,
Search
$search,
ShopContextInterface
$context ) { $randomQuery =
new FunctionScoreQuery(new MatchAllQuery());
$randomQuery->
addRandomFunction(md5(uniqid('swag', true
)));
$search->
addSort(new FieldSort('_score'
));
$search->
addQuery($randomQuery);
}}