Elasticsearch- Aggregation pagination

I am working on elastic search. I have to show report data but I need to
group by them. Since I have large amount of data so I can not paginate
client side. Can anyone explain how we can do pagination while using
aggregation.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/51ca6d7f-d673-4a20-9eba-592f35951b3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

1 Like

I would like to know the answer to this question as well.

Adrien says in this thread that aggregation pagination is not supported at
the moment
http://elasticsearch-users.115913.n3.nabble.com/ES-aggregation-and-pagination-td4052774.html,
but they seem to have come close to a solution.

On Monday, July 28, 2014 8:13:51 AM UTC-5, Manoj Singh wrote:

I am working on Elasticsearch. I have to show report data but I need to
group by them. Since I have large amount of data so I can not paginate
client side. Can anyone explain how we can do pagination while using
aggregation.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/200d7b92-eb8e-46a7-9863-05e852522775%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Daniel and Manoj,

Aggregations don't support pagination. This is something that would need to
be handled on the client side. For example, if you display the first page
using a terms aggregations of size 100 and shard_size 1000 and the user
wants to see the second page, you would need to run the query again with
size=200, shard_size=1000 and ignore the top 100 terms.

It is a good idea to keep the shard_size constant across pages so that the
accuracy issues[1] of the terms aggregation remain the same.

[1] https://github.com/elasticsearch/elasticsearch/issues/1305

On Mon, Jul 28, 2014 at 7:01 PM, Daniel Yim danielyim@gmail.com wrote:

I would like to know the answer to this question as well.

Adrien says in this thread that aggregation pagination is not supported at
the moment
http://elasticsearch-users.115913.n3.nabble.com/ES-aggregation-and-pagination-td4052774.html,
but they seem to have come close to a solution.

On Monday, July 28, 2014 8:13:51 AM UTC-5, Manoj Singh wrote:

I am working on Elasticsearch. I have to show report data but I need to
group by them. Since I have large amount of data so I can not paginate
client side. Can anyone explain how we can do pagination while using
aggregation.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/200d7b92-eb8e-46a7-9863-05e852522775%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/200d7b92-eb8e-46a7-9863-05e852522775%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5jZWcfFfGGhDCGo6n-f2%3D7FgMjmr2Nybsk_7bTRfeJQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.