Here are the details:
Template:
{
"template": "*-log",
"order": 10,
"mappings": {
"accesslog": {
"_all": {
"enabled": false
},
"properties": {
"accountid": {
"type": "string",
"index_options": "docs",
"norms": {
"enabled": false
},
"index": "not_analyzed"
},
"applicationid": {
"type": "string",
"index_options": "docs",
"norms": {
"enabled": false
},
"index": "not_analyzed"
},
"connstarttime": {
"type": "long",
"doc_values": false,
"norms": {
"enabled": false
},
"index": "no"
},
"esttime": {
"type": "long",
"doc_values": false,
"norms": {
"enabled": false
},
"index": "no"
}
}
}
}
}
liske this i have around 70 fields, 60 fields with below setting
: {
"type": "long",
"doc_values": false,
"norms": {
"enabled": false
},
"index": "no"
}
And i keep pumping the data, document from ES looks like below
{
"took": 6,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 267582,
"max_score": 1.0,
"hits": [
{
"_index": "706963e4-f062-42da-b370-845045eb4160-1815955521-2018.03.16.03-accesslog",
"_type": "accesslog",
"_id": "AWIvZ7xquw9w1jqlI1tC",
"_score": 1.0,
"_source": {
"applicationid": 0,
"accountid": 0,
"ssl": false,
"connstarttime": 0,
"esttime": 0,
When i post query for searching connstarttime and aggregate sum by ssl
like below
"aggregations" : {
"orders" : {
"terms" : {
"field" : "ssl"
},
"aggregations" : {
"histogram" : {
"histogram" : {
"field" : "timestamp",
"interval" : 60000,
"order" : {
"_key" : "asc"
}
},
"aggregations" : {
"responseSize_sum" : {
"sum" : {
"field" : "connstarttime"
}
}
it returns me the proper results...
How it is possible?