# How to make pagination work in Datatables using Elasticsearch on the server-side?

**URL:** https://discuss.elastic.co/t/how-to-make-pagination-work-in-datatables-using-elasticsearch-on-the-server-side/61488
**Category:** Elasticsearch
**Created:** [September 26, 2016, 7:29am UTC](https://discuss.elastic.co/t/how-to-make-pagination-work-in-datatables-using-elasticsearch-on-the-server-side/61488 "2016-09-26T07:29:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![johnjullies](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@johnjullies](https://discuss.elastic.co/u/johnjullies)
#### Post date: [September 26, 2016, 7:29am UTC](https://discuss.elastic.co/t/how-to-make-pagination-work-in-datatables-using-elasticsearch-on-the-server-side/61488/1 "2016-09-26T07:29:08Z")

</div>

I'm using [Datatables.net](https://datatables.net/) with Elasticsearch as a server because I'm working with large data.

I have successfully populated the table but I'm having trouble making the pagination work. It currently shows same data on all pages of the table and only shows the first 10 items. I think this is related to the default limit of elasticsearch to only show the first 10 items.

---

<div class="post-metadata">

### Author: ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)
#### Post date: [September 26, 2016, 9:51pm UTC](https://discuss.elastic.co/t/how-to-make-pagination-work-in-datatables-using-elasticsearch-on-the-server-side/61488/2 "2016-09-26T21:51:47Z")

</div>

Unfortunately there's not much we can do to support that, pagination in ES works fine with the `from` and `size` parameters, so it sounds like something on the datatables configuration side?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:17pm UTC](https://discuss.elastic.co/t/how-to-make-pagination-work-in-datatables-using-elasticsearch-on-the-server-side/61488/3 "2017-07-05T22:17:09Z")

</div>


