# How to get a previous page from elasticsearch using search\_after?

**URL:** https://discuss.elastic.co/t/how-to-get-a-previous-page-from-elasticsearch-using-search-after/105028
**Category:** Elasticsearch
**Created:** [October 24, 2017, 9:38am UTC](https://discuss.elastic.co/t/how-to-get-a-previous-page-from-elasticsearch-using-search-after/105028 "2017-10-24T09:38:43Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [November 1, 2017, 8:40pm UTC](https://discuss.elastic.co/t/how-to-get-a-previous-page-from-elasticsearch-using-search-after/105028/2 "2017-11-01T20:40:16Z")

</div>

This query looks very complicated. Generally, you can use `search_after` but reverse the sort order to get the page before. See also a similar discussion on GitHub: [https://github.com/elastic/elasticsearch/issues/24364](https://github.com/elastic/elasticsearch/issues/24364)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-get-a-previous-page-from-elasticsearch-using-search-after/105028)._
