# Pagination Search - page 1 to page 5

**URL:** <https://discuss.elastic.co/t/pagination-search-page-1-to-page-5/348668>\
**Category:** Elasticsearch\
**Created:** [December 5, 2023, 5:12pm UTC](https://discuss.elastic.co/t/pagination-search-page-1-to-page-5/348668 "2023-12-05T17:12:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasonespo](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Jasonespo](https://discuss.elastic.co/u/Jasonespo)\
**Post date:** [December 5, 2023, 5:12pm UTC](https://discuss.elastic.co/t/pagination-search-page-1-to-page-5/348668/1 "2023-12-05T17:12:36Z")

</div>

Hi,

We're trying to implement pagination for our application. We are displaying a table with 10 results per page. And we're wondering if it's possible to go from page 1 (record 1-10) to page 5 (record 51-60) in one jump.

Our current logic will allow us to go from 1,2,3,4,5 but not in one go.

```auto
{
    "query": {
        "match": {
            "title": "elasticsearch"
        }
    },
    "search_after": [1463538857, "654323"],
    "sort": [
        {"date": "asc"},
        {"tie_breaker_id": "asc"}
    ]
}

```

How do we know what the 50th record is to be able to set the keys to search after and load page 5 in one jump? Hope this makes sense, let me know if additional context is required. I assume this is possible as it's a requirement for many dbs...

Thanks,

Jason

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [December 6, 2023, 9:30pm UTC](https://discuss.elastic.co/t/pagination-search-page-1-to-page-5/348668/2 "2023-12-06T21:30:06Z")

</div>

Hi @Jasonespo

I recommend read this article [Elasticsearch Pagination Techniques: SearchAfter, Scroll, Pagination & PIT](https://opster.com/guides/elasticsearch/how-tos/elasticsearch-pagination-techniques/)

---

<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:** [January 3, 2024, 9:31pm UTC](https://discuss.elastic.co/t/pagination-search-page-1-to-page-5/348668/3 "2024-01-03T21:31:02Z")

</div>

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