# Search, get bottom N search results, instead of top N, when size=N

**URL:** <https://discuss.elastic.co/t/search-get-bottom-n-search-results-instead-of-top-n-when-size-n/19876>\
**Category:** Elasticsearch\
**Created:** [September 19, 2014, 2:42am UTC](https://discuss.elastic.co/t/search-get-bottom-n-search-results-instead-of-top-n-when-size-n/19876 "2014-09-19T02:42:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Md\_Ziaul\_Haque](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Md\_Ziaul\_Haque](https://discuss.elastic.co/u/Md_Ziaul_Haque)\
**Post date:** [September 19, 2014, 2:42am UTC](https://discuss.elastic.co/t/search-get-bottom-n-search-results-instead-of-top-n-when-size-n/19876/1 "2014-09-19T02:42:12Z")

</div>

Assume,  
Api = \_search  
size=2  
sort = based on timestamp in desc order  
Assume total result count is 10,

since size is 2, my query will return top 2 results, but I want to get  
bottom 2, that is 9th and 10th results

how do I write my query to get result that way?

Thanks,  
Ziaul

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f0930d9-91b9-4dd5-b750-822d8e135fa7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f0930d9-91b9-4dd5-b750-822d8e135fa7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![zkun](https://avatars.discourse-cdn.com/v4/letter/z/8797f3/32.png) [@zkun](https://discuss.elastic.co/u/zkun)\
**Post date:** [September 18, 2016, 7:27am UTC](https://discuss.elastic.co/t/search-get-bottom-n-search-results-instead-of-top-n-when-size-n/19876/2 "2016-09-18T07:27:30Z")

</div>

Try use sort in asc order.

---

<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:19pm UTC](https://discuss.elastic.co/t/search-get-bottom-n-search-results-instead-of-top-n-when-size-n/19876/3 "2017-07-05T22:19:25Z")

</div>


