Hi all,
im getting this error on aggs query and i want to do multiple aggregation can you pls help here.
{
"error" : {
"root_cause" : [
{
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [3].",
"line" : 35,
"col" : 8
}
],
"type" : "parsing_exception",
"reason" : "Unknown key for a START_OBJECT in [3].",
"line" : 35,
"col" : 8
},
"status" : 400
}
When making this query on elasticsearch. pls help me correct the query i want do more multiple aggregation query on index.
GET /_search
{
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": 1663666935141,
"lte": 1663668735142,
"format": "epoch_millis"
}
}
},
{
"query_string": {
"analyze_wildcard": true,
"query": "service.name:*kmw*"
}
}
]
}
},
"aggs": {
"2": {
"terms": {
"field": "labels.client_id",
"size": 10000,
"order": {
"_key": "desc"
},
"min_doc_count": 1
}
}
},
"3": {
"sum": {
"field": "labels.row_count",
"size": 10000,
"order": {
"_key": "desc"
},
"min_doc_count": 1
}
}
}
Would someone guide me correcting this error, im not able to do multiple aggregation query on index.
Thanks.