感谢大神指点,查询语句中加上
"profile": true,
可以看到每一步的耗时。
以下是其中一个shad的耗时统计,请问next_doc占据了近1/3的时间,这正常吗?
是不是因为我们一个shad中数据过多,需要(重建索引)增大shad数?
"time_in_nanos": 2238434609,
"breakdown": {
"score": 341004973,
"build_scorer_count": 49,
"match_count": 37,
"create_weight": 443801477,
"next_doc": 939474127,
"match": 205102762,
"create_weight_count": 1,
"next_doc_count": 71,
"score_count": 12,
"build_scorer": 309051100,
"advance": 0,
"advance_count": 0
},
"profile": true,
可以看到每一步的耗时。
以下是其中一个shad的耗时统计,请问next_doc占据了近1/3的时间,这正常吗?
是不是因为我们一个shad中数据过多,需要(重建索引)增大shad数?
"time_in_nanos": 2238434609,
"breakdown": {
"score": 341004973,
"build_scorer_count": 49,
"match_count": 37,
"create_weight": 443801477,
"next_doc": 939474127,
"match": 205102762,
"create_weight_count": 1,
"next_doc_count": 71,
"score_count": 12,
"build_scorer": 309051100,
"advance": 0,
"advance_count": 0
},
2 个回复
rochy - rochy_he
赞同来自:
Leeeo - 90后IT男
赞同来自:
{
"query": {
"bool": {
"filter": {
"bool": {
"must": [{
"bool": {
"should": [{
"term": {
"profession": "170"
}
}]
}
},
{
"bool": {
"should": []
}
},
{
"range": {
"refresh_time": {
"gte": "20180701"
}
}
},
{
"range": {
"res_level": {
"gte": 1
}
}
},
{
"term": {
"res_category": 1
}
},
{
"range": {
"degree": {
"lte": "050"
}
}
},
{
"range": {
"start_work_year": {
"lte": 2012
}
}
},
{
"range": {
"expected_salary_4_recom": {
"lte": 182000
}
}
},
{
"range": {
"salary": {
"gte": 78000
}
}
},
{
"bool": {
"should": [{
"term": {
"expected_city_4_recom": "170"
}
},
{
"prefix": {
"expected_city_4_recom": "170020"
}
}]
}
},
{
"bool": {
"should": [{
"term": {
"open_to": "0"
}
},
{
"term": {
"open_to": "2"
}
}]
}
},
{
"range": {
"user_id": {
"gt": 0
}
}
}]
}
}
}
},
"_source": ["user_id",
"login_date",
"res_stats_count"],
"size": 200
}