Commit 43d2213a authored by 段英荣's avatar 段英荣

modify

parent c4cfa885
......@@ -300,9 +300,9 @@ class TopicUtils(object):
query_function_score["query"]["bool"]["minimum_should_match"] = 1
q["query"]["function_score"] = query_function_score
# q["collapse"] = {
# "field": "user_id"
# }
q["collapse"] = {
"field": "user_id"
}
q["_source"] = {
"includes":["id","group_id","offline_score","user_id","edit_tag_list"]
}
......
......@@ -169,8 +169,11 @@ def home_recommend(device_id="", user_id=-1, offset=0, size=10, query_type=Topic
recommend_topic_ids = list()
es_node_load_high_flag = ESPerform.if_es_node_load_high(ESPerform.get_cli())
try:
es_node_load_high_flag = ESPerform.if_es_node_load_high(ESPerform.get_cli())
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
es_node_load_high_flag = True
if es_node_load_high_flag:
temp_downgrading_key = "physical:home_recommend:user_id:241407656:query_type:1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment