Hi all I have 200 Gb data in Elasticsearch and when I excecute an aggregate query it takes 8 seconds. My client goes in timeout.
Actually my query is like that:
{
"aggs": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"accountUuid": "12163397"
}
},
{
"range": {
"currentDate": {
"from": 1203891371186,
"to": 1806483371186
}
}
} ]
}
},
"aggs": {
"usage_time_histogram" : {
"date_histogram" : {
"field" : "currentDate",
"interval" : "month"
},
"aggs": {
"totalUpload": {
"sum": {
"field": "usageUpload"
}
},
"totalDownload": {
"sum": {
"field": "usageDownload"
}
} ,
"totalTraffic": {
"sum": {
"field": "totalTraffic"
}
}
}
}
}
}
},
"size": 0
}
and the index is mappes like that:
{
"statistic": {
"mappings": {
"properties": {
"_class": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"accountUuid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"appCategory": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"currentDate": {
"type": "long"
},
"fastwebCategory": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"profileID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"serviceName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"statisticID": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"totalTraffic": {
"type": "long"
},
"usageDownload": {
"type": "long"
},
"usageTime": {
"type": "long"
},
"usageUpload": {
"type": "long"
}
}
}
}
}
Is it only a hardware matter? How to increase speed of my aggregate query? Sorry for my poor english, and thanks in advance