Hi there I am new to Elasticsearch and my use case in this regard is pretty simple, I am running a query, with aggregations, which returns result > 10000 documents. I am navigating through the buckets and getting relevant data.
Below is the query
POST staging-order/_search
{
"size": 10000
,
"aggs": {
"order_ranges": {
"range": {
"field": "order.delivery_date",
"ranges": [
{
"from": "2019-01-30T06:33:07+00:00",
"to": "2020-01-30T06:33:07+00:00"
},
{
"from": "2020-01-30T06:33:07+00:00",
"to": "2020-03-30T06:33:07+00:00"
},
{
"from": "2020-03-30T06:33:07+00:00",
"to": "2020-07-30T06:33:07+00:00"
}
]
}
, "aggs": {
"customer_email": {
"terms": {
"field": "order.customer_id","size": 10000
}
}
}
}
}
}
The parameters of from and to can be optional.
While running this I am getting too_many_buckets_exception.
Changing the index.max_result_window
looks more of a temporary hack with a good possibility of putting extra strain on resources. My environment is AWS driven so I don't know how to change the settings. I tried to change it using below query
POST _cluster/settings
{
"transient": {
"search.max_buckets": 20000
}
}
But got an error - "Your request: '/_cluster/settings' is not allowed for verb: POST"
Thanks for the help!