Aggregation - returning all buckets

Dear all,
I am running the following query:

curl -XPOST
-d '{
"aggs": {
"sessions": {
"terms": {
"field": "sessionId",
"size": 0

  "aggs": {
    "sessions_hits": {
      "top_hits": {
        "sort": [
            "@timestamp": {
              "order": "desc"


As I read on multiple resources, setting size to 0 should return all
buckets, however I am still getting 3 buckets per aggregation.

What am I doing wrong here?

Thank you!


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
To view this discussion on the web visit
For more options, visit