FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

Any way to disable use of output Walkers in FOSElasticaBundle ?

Open samy opened this issue 2 years ago • 0 comments

In current (6.3.1) version of FOSElasticaBundle, the ORMAdapter creates a $pager using the following code:

$pager = new PagerfantaPager(new Pagerfanta(new QueryAdapter($qb)));

Not using extra parameters of QueryAdapter constructor not allows us to disable the use of output walkers.

Why I try to disable the use of output walkers?

With : when PagerFanta paginates and computes the number of results, it uses subqueries (it is a native behaviour of Doctrine) Without output walkers : it makes a simple SELECT COUNT(*) (3x times faster)

samy avatar Sep 04 '23 14:09 samy