# Pagination with faceting?

**URL:** <https://discuss.elastic.co/t/pagination-with-faceting/4833>\
**Category:** Elasticsearch\
**Created:** [July 11, 2011, 10:00am UTC](https://discuss.elastic.co/t/pagination-with-faceting/4833 "2011-07-11T10:00:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hari\_Shankar](https://avatars.discourse-cdn.com/v4/letter/h/ad7895/32.png) [@Hari\_Shankar](https://discuss.elastic.co/u/Hari_Shankar)\
**Post date:** [July 11, 2011, 10:00am UTC](https://discuss.elastic.co/t/pagination-with-faceting/4833/1 "2011-07-11T10:00:48Z")

</div>

Hi,

I am using the terms\_stats facet a lot to do aggregation and sorting based  
on aggregated values. There are several instances where I have to show, lets  
say, the third page of the sorted result set. In a regular query, I can use  
the "size" and "from" properties to achieve this. But how can I do this with  
facets? Currently if I have to fetch results 20-30, I have to set the facet  
size to 30 and pick the bottom 10. Any better/more efficient way to do this?

Thanks,  
Hari

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 11, 2011, 5:08pm UTC](https://discuss.elastic.co/t/pagination-with-faceting/4833/2 "2011-07-11T17:08:25Z")

</div>

Nope, thats the way to do it.

On Monday, July 11, 2011 at 1:00 PM, Hari Shankar wrote:

> Hi,
> 
> I am using the terms\_stats facet a lot to do aggregation and sorting based on aggregated values. There are several instances where I have to show, lets say, the third page of the sorted result set. In a regular query, I can use the "size" and "from" properties to achieve this. But how can I do this with facets? Currently if I have to fetch results 20-30, I have to set the facet size to 30 and pick the bottom 10. Any better/more efficient way to do this?
> 
> Thanks,  
> Hari

---

<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, 4:01am UTC](https://discuss.elastic.co/t/pagination-with-faceting/4833/3 "2017-07-06T04:01:00Z")

</div>


