Running aggregation over more than 10,000 documents

Hi all,

Somewhat similar to this (Terms Aggregation on billions of documents) - I'm trying to run a simple query against my 10 billion documents index, something that looks like this:

{
     "aggs": {
          "by_fieldA": {
               "terms": {
                    "field": "fieldA.keyword",
                    "order": { "byFieldB" : "desc"}
               },
               "aggs": {
                    "byFieldB": {
                         "cardinality": {
                              "field": "fieldB.keyword"
                         }
                    }
               }
          }
     }
}

In the result, I can see that the response is for 10000 hits. Is there any way to run this query on the entire index? When I build a similar visualization in Kibana it runs seamlessly in less than half the time on the entire index. Does Kibana scroll through the index, or is there a way to perform this aggregation in API over billions of documents?

Cheers.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.