Elasticsearch-dsl (6.2.1) aggs failed to return any buckers

Hi,
The following search failed to return any results on a Elasticsearch 6.3.2 cluster
rs = es.search(index="1234_index", size=0,
body={"query": { "bool": { "must": [{"match_all": {}}] } },
"aggs" : { "well_groups": { "terms": { "field": "guid", "size": 10000},
"aggs": { "max_inc" : { "max" : { "field" : "Inc" } } }}}})
buckets = rs['aggregations']['well_groups']['buckets']
where len(buckets) is zero.

However, the following query using Kibana (6.3.2) Dev Tools' Console returns correct results. Any idea what I have missed in the above search. Thanks.
POST /1234_index/_search?size=0
{
"query":
{ "bool": { "must": [{"match_all": {}}] } },
"aggs" :
{ "well_groups":
{ "terms": { "field": "guid", "size":10000 },
"aggs": { "max_inc" : { "max" : { "field" : "Inc" } } }
}
}
}

Results:
{
"took": 4,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 389,
"max_score": 0,
"hits": []
},
"aggregations": {
"well_groups": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "0092B884A1294405BB051D63A7FBAC47",
"doc_count": 79,
"max_inc": {
"value": 0.8360127117052838
}
},
{
"key": "001BF64A233444D59F134DB19E31B1A2",
"doc_count": 75,
"max_inc": {
"value": 0.5907939518000807
}
},
{
"key": "008F52BE62CA431BB90C8653215F36B7",
"doc_count": 74,
"max_inc": {
"value": 0.505098285527159
}
},
{
"key": "0076ADF536AF40719E8DE12CBD6B0F98",
"doc_count": 55,
"max_inc": {
"value": 0.46041785667610413
}
},
{
"key": "007EF2B5A4404B54BE488B04001B3E95",
"doc_count": 55,
"max_inc": {
"value": 0.6017895260876447
}
},
{
"key": "007EF2B5A4404B54BE488B04001B3E11",
"doc_count": 37,
"max_inc": {
"value": 0.4389503068765739
}
},
{
"key": "00204C615CF740499F4AFA5D72085C85",
"doc_count": 14,
"max_inc": {
"value": 0.37960911230876665
}
}
]
}
}
}

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