Pagination on elasticsearch results


(Akhil Prashar) #1

I would like to display 20 results per page. And am thinking that total number of hits should be divided by 20 and on click of next button I should get the next 20 results.
this is a snippet of my code
if(isset($results['hits']))
{
$hits = $results['hits'];
$rows = $hits['hits'];
$result_page="";
foreach($rows as $row)

can anyone help me with addition in code I have already described from=0 and size=20 above.

I ahve added following div at the end of my php code

«

1
2
3
4
5
»


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.