# Offsetting by value in facet set (from parameter)

**URL:** <https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453>\
**Category:** Elasticsearch\
**Created:** [October 24, 2012, 1:22am UTC](https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453 "2012-10-24T01:22:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@James\_Reynolds](https://discuss.elastic.co/u/James_Reynolds)\
**Post date:** [October 24, 2012, 1:22am UTC](https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453/1 "2012-10-24T01:22:15Z")

</div>

Hello all:

> <https://stackoverflow.com/questions/13041276/elasticsearch-offset-and-limit-facets>

I have a question at stack overflow above.

If this isn't possible right now, do any of you know if this will be  
possible after lucene 4 is integrated?

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 24, 2012, 10:41am UTC](https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453/2 "2012-10-24T10:41:29Z")

</div>

I think it can be implemented even without lucene 4.  
With relatively simple modification elasticsearch could drop first N facets  
before sending results to the client, it would still have to collect  
(offset + size) facets from shards though in order to sort them correctly.  
But I am really curious why do you need support for offsets in terms stats  
facets? Could you tell us a little bit about your use case? Are you paging  
through a lot of facets?

On Tuesday, October 23, 2012 9:22:15 PM UTC-4, James Reynolds wrote:

> Hello all:
> 
> [elasticsearch offset and limit facets - Stack Overflow](http://stackoverflow.com/questions/13041276/elasticsearch-offset-and-limit-facets)
> 
> I have a question at stack overflow above.
> 
> If this isn't possible right now, do any of you know if this will be  
> possible after lucene 4 is integrated?

--

---

<div class="post-metadata">

**Author:** ![James\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@James\_Reynolds](https://discuss.elastic.co/u/James_Reynolds)\
**Post date:** [October 24, 2012, 1:20pm UTC](https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453/3 "2012-10-24T13:20:56Z")

</div>

Thanks for the reply:

You are exactly correct, the result set of the facets could be incredibly  
long - possibly tens of thousands. Ideally, we'd like a user to be able to  
click on pages something like 1,2,3 ... [last page] (typical pagination).

On Wednesday, October 24, 2012 6:41:29 AM UTC-4, Igor Motov wrote:

> I think it can be implemented even without lucene 4.  
> With relatively simple modification elasticsearch could drop first N facets  
> before sending results to the client, it would still have to collect  
> (offset + size) facets from shards though in order to sort them correctly.  
> But I am really curious why do you need support for offsets in terms stats  
> facets? Could you tell us a little bit about your use case? Are you paging  
> through a lot of facets?
> 
> On Tuesday, October 23, 2012 9:22:15 PM UTC-4, James Reynolds wrote:
> 
> > Hello all:
> > 
> > [elasticsearch offset and limit facets - Stack Overflow](http://stackoverflow.com/questions/13041276/elasticsearch-offset-and-limit-facets)
> > 
> > I have a question at stack overflow above.
> > 
> > If this isn't possible right now, do any of you know if this will be  
> > possible after lucene 4 is integrated?

--

---

<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, 3:07am UTC](https://discuss.elastic.co/t/offsetting-by-value-in-facet-set-from-parameter/9453/4 "2017-07-06T03:07:26Z")

</div>


