3. Customizing the query used to generate the listΒΆ

You can customize the list query thanks to the createQuery method:

public function createQuery($context = 'list')
{
    $query = parent::createQuery($context);

    $queryparam = new \Elastica\Query\Match();
    $queryparam->setFieldQuery('my_param', 'my_value');
    $query->addMust($queryparam);

    return $query;
}