"profile": {
"shards": [
{
"id": "[8TfRDHgvS5i1U_702Td5rg][test][5]",
"searches": [
{
"query": [
{
"type": "BooleanQuery",
"description": "#ConstantScore(user_id:user_490) #timestamp:[1500080755000 TO 1500084354999]",
"time_in_nanos": 378586448,
"breakdown": {
"score": 0,
"build_scorer_count": 28,
"match_count": 0,
"create_weight": 43880,
"next_doc": 63718,
"match": 0,
"create_weight_count": 1,
"next_doc_count": 380,
"score_count": 0,
"build_scorer": 378478441,
"advance": 0,
"advance_count": 0
},
"children": [
{
"type": "ConstantScoreQuery",
"description": "ConstantScore(user_id:user_490)",
"time_in_nanos": 406738,
"breakdown": {
"score": 0,
"build_scorer_count": 28,
"match_count": 0,
"create_weight": 12584,
"next_doc": 69098,
"match": 0,
"create_weight_count": 1,
"next_doc_count": 362,
"score_count": 0,
"build_scorer": 234086,
"advance": 90558,
"advance_count": 21
},
"children": [
{
"type": "TermQuery",
"description": "user_id:user_490",
"time_in_nanos": 334375,
"breakdown": {
"score": 0,
"build_scorer_count": 28,
"match_count": 0,
"create_weight": 5813,
"next_doc": 35608,
"match": 0,
"create_weight_count": 1,
"next_doc_count": 362,
"score_count": 0,
"build_scorer": 204156,
"advance": 88386,
"advance_count": 21
}
}
]
},
{
"type": "IndexOrDocValuesQuery",
"description": "timestamp:[1500080755000 TO 1500084354999]",
"time_in_nanos": 377703084,
"breakdown": {
"score": 0,
"build_scorer_count": 21,
"match_count": 0,
"create_weight": 3532,
"next_doc": 849,
"match": 0,
"create_weight_count": 1,
"next_doc_count": 18,
"score_count": 0,
"build_scorer": 377437519,
"advance": 260781,
"advance_count": 363
}
}
]
}
],
"rewrite_time": 57006,
"collector": [
{
"name": "CancellableCollector",
"reason": "search_cancelled",
"time_in_nanos": 777890,
"children": [
{
"name": "MultiCollector",
"reason": "search_multi",
"time_in_nanos": 745265,
"children": [
{
"name": "TotalHitCountCollector",
"reason": "search_count",
"time_in_nanos": 22781
},
{
"name": "ProfilingAggregator: [org.elasticsearch.search.profile.aggregation.ProfilingAggregator@68640975]",
"reason": "aggregation",
"time_in_nanos": 659802
}
]
}
]
}
]
}
],
"aggregations": [
{
"type": "org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregator",
"description": "result2",
"time_in_nanos": 491939,
"breakdown": {
"reduce": 0,
"build_aggregation": 76644,
"build_aggregation_count": 1,
"initialize": 16863,
"initialize_count": 1,
"reduce_count": 0,
"collect": 398070,
"collect_count": 360
},
"children": [
{
"type": "org.elasticsearch.search.aggregations.metrics.max.MaxAggregator",
"description": "max_of_field",
"time_in_nanos": 122156,
"breakdown": {
"reduce": 0,
"build_aggregation": 9376,
"build_aggregation_count": 60,
"initialize": 2935,
"initialize_count": 1,
"reduce_count": 0,
"collect": 109424,
"collect_count": 360
}
}
]
}
]
}
]
}
It seems most of the time cost on build_scorer! It's a little strange for filter query.
The ES version is 6.0.0-alpha2