# Get every Nth doc with sorted result

**URL:** https://discuss.elastic.co/t/get-every-nth-doc-with-sorted-result/23051
**Category:** Elasticsearch
**Created:** [April 2, 2015, 2:21am UTC](https://discuss.elastic.co/t/get-every-nth-doc-with-sorted-result/23051 "2015-04-02T02:21:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ted\_Smith](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Ted\_Smith](https://discuss.elastic.co/u/Ted_Smith)
#### Post date: [April 2, 2015, 2:21am UTC](https://discuss.elastic.co/t/get-every-nth-doc-with-sorted-result/23051/1 "2015-04-02T02:21:09Z")

</div>

Hello:

I have a query sorting over a field and returns all hits (I set size to max)  
Is there any way in query to specify that I only want  
the first, 6th, 11th, so it would only return these, instead of return  
all of  
them that I have to skip unwanted.

Thanks very much

--  
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/ba3ee392-083d-4ecc-bbff-a6900cff06d3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ba3ee392-083d-4ecc-bbff-a6900cff06d3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:22am UTC](https://discuss.elastic.co/t/get-every-nth-doc-with-sorted-result/23051/2 "2017-07-06T00:22:08Z")

</div>


