# Sorting with from/size parameter

**URL:** <https://discuss.elastic.co/t/sorting-with-from-size-parameter/21482>\
**Category:** Elasticsearch\
**Created:** [January 5, 2015, 2:57pm UTC](https://discuss.elastic.co/t/sorting-with-from-size-parameter/21482 "2015-01-05T14:57:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vipins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vipins/32/979_2.png) [@vipins](https://discuss.elastic.co/u/vipins)\
**Post date:** [January 5, 2015, 2:57pm UTC](https://discuss.elastic.co/t/sorting-with-from-size-parameter/21482/1 "2015-01-05T14:57:51Z")

</div>

I have to use sorting along with from and size parameters in the elastic  
search query.

I am querying elastic search with 0 to 100 records and then 101 to 200  
records and then 201 to 300 records. I have to sort the entire set with  
salary field.

Will it sort the whole set and takes 100 records at a time or will it take  
100 records and then apply sorting and then proceed similarly.

Please confirm

--  
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/30c31941-66ac-4183-b04c-61b179ae50ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30c31941-66ac-4183-b04c-61b179ae50ef%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:40am UTC](https://discuss.elastic.co/t/sorting-with-from-size-parameter/21482/2 "2017-07-06T00:40:52Z")

</div>


