Need help: histogram & time zone

Data source:

"hits": [{
"_index": "log",
"_type": "accesslog",
"_id": "5b2977e843644c8a7e8b4582",
"_score": 1,
"_source": {
	"id": {
		"$id": "5b2977e843644c8a7e8b4582"
	},
	"ip": "117.30.209.86",
	"source_url": "www",
	"ctime": "2018-06-20 05:38:48",
	"ctimeint": 1529444328,
	"pagemarks": "PC",
	"user_id": 1021001,
	"url": "id=101119055",
	"user_agent": "Microsoft Internet Explorer"
}

}, ]

ES query Code:

GET / log / accesslog / _search  {
"size": 0,
"query": {
	"filtered": {
		"query": {
			"bool": {
				"must": [{
					"range": {
						"ctimeint": {
							"gte": 1532016000,
							"lt": 1532275200
						}
					}
				}]
			}
		}
	}
},
"aggs": {
	"time": {
		"histogram": {
			"field": "ctimeint",
			"interval": 86400
		},
		"aggs": {
			"mark": {
				"terms": {
					"field": "pagemarks",
					"size": 0,
					"collect_mode": "breadth_first"
				},
				"aggs": {
					"ip": {
						"cardinality": {
							"field": "ip"
						}
					}
				}
			}
		}
	}
}
}

Result:

"aggregations": {
"time": {
	"buckets": [{
		"key": 1531958400,
		"doc_count": 1266094,
		"mark": {
			"doc_count_error_upper_bound": 0,
			"sum_other_doc_count": 0,
			"buckets": [{
				"key": "groupbuydetail",
				"doc_count": 89115,
				"ip": {
					"value": 3494
				}
			}, ]
		}
	}]
}

Question:

I would like to query the agg histogram data between 2018/7/20 and 2018/7/23(time zone: Asia/Shanghai); But the time for aggregation statistics is 2018/7/19 08:00:00

the key :
query->range: 1532016000 (2018/7/20) ~ 1532275200 (2018/7/23)
agg->buckets: 1531958400 (2018/7/19 08:00:00)

1, Data Source: hits->ctime time zone is Asia/Shanghai

2, my elasticsearch version is 1.7.3

3, my linux(centos) date like : Tue Jul 24 18:21:06 CST 2018;

Excuse me, big cow
I know data_histogram using time_zone,but about histogram
How to make the aggregation statistics time like: 2018/7/20 2018/7/21 2018/7/22... ?

Waiting online! 3Q 3Q 3Q!

Sorry, I can't find the problem of elasticsearch version 1.7.3

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