ripaclub / sphinxsearch

Sphinx Search library provides SphinxQL indexing and searching features
BSD 2-Clause "Simplified" License
62 stars 10 forks source link

How to add paginator? #37

Closed academici closed 9 years ago

leogr commented 9 years ago

In order to work with Zend\Paginator you need to implement your own paginator adapter (in a similar way the Zend\Paginator\Adapter\DbSelect does). Also, you can use:

$search = new SphinxSearch\Search(....);
//.... your query .....
$count = $search->showMeta('total_found');

to the get the total results count.

Let me know if that will help you.

academici commented 9 years ago

Thank, I created a pagination class extended Zend\Paginator\Adapter\DbSelect