algolia / search-bundle

Seamless integration of Algolia Search into your Symfony project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination doesn't seem possible with Algolia\SearchBundle\IndexManager::search()

NoodlesNZ opened this issue · comments

  • Symfony version: 4.3
  • Algolia Search Bundle version: 3.3.2
  • Language Version: PHP 7.2.19

Description

Using the search() method is great because it returns an array of entities that we can output into our template. The only problem is there's no metadata returned and the only way to get total count etc is to run a IndexManager::count() which fires another query at the Algolia API.

Would it be better to populate an ArrayCollection with entity references of all the results and paginate against this? This would mean it would be possible to use something like https://github.com/KnpLabs/KnpPaginatorBundle to manage pagination.

I'm happy to make a PR but just wanted to check if I'm overlooking something.

As explained in the related PR (#308), I'm closing this issue. Thanks a lot for your contribution!