Hi,
I have problems when trying to get aggregations. I have a cluster with one node, and I'm trying to interact with an index that contains 534,737,088 documents (around 32 GB). Some aggregations work, and Elasticsearch returns an answer (for example a cardinality aggregation over a field). However, I'm getting an error when running other aggregations such as the following:
curl -X GET 'http://localhost:9200/<my_index>/_search?pretty' -H 'Content-type:application/json' -d'
{
"size": 0,
"aggs": {
"agg_A": {
"terms": {
"field": "field_A",
"size": 10
},
"aggs": {
"agg_B": {
"terms": {
"field": "field_B",
"size": 10
}
}
}
}
}
}
'
The error that I'm getting is the following (partial)
{
"error" : {
"root_cause" : [
{
"type" : "circuit_breaking_exception",
"reason" : "[parent] Data too large, data for [allocated_buckets] would be [997902256/951.6mb], which is larger than the limit of [996147200/950mb], real usage: [997902256/951.6mb], new bytes reserved: [0/0b], usages [model_inference=0/0b, eql_sequence=0/0b, fielddata=453457236/432.4mb, request=200254400/190.9mb, inflight_requests=10806/10.5kb]",
"bytes_wanted" : 997902256,
"bytes_limit" : 996147200,
"durability" : "PERMANENT"
},
{
"type" : "circuit_breaking_exception",
"reason" : "[parent] Data too large, data for [allocated_buckets] would be [1000273024/953.9mb], which is larger than the limit of [996147200/950mb], real usage: [1000273024/953.9mb], new bytes reserved: [0/0b], usages [model_inference=0/0b, eql_sequence=0/0b, fielddata=453457236/432.4mb, request=50063600/47.7mb, inflight_requests=526/526b]",
"bytes_wanted" : 1000273024,
"bytes_limit" : 996147200,
"durability" : "PERMANENT"
},
...
...
...
"status" : 429
}
I'd appreciate if you could give me some insights about this issue. Is it a configuration problem? Is there any way to solve the problem and get these type of aggregations? Is Elasticsearch able to return these aggregation or it exceeds its capabilities?
Best regards,
Edit: I get this error when running the aggregation in this way, using Kibana, and also using the Python API