Commit f591c486 authored by 段英荣's avatar 段英荣

打散

parent 30d47c3d
......@@ -230,6 +230,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["_source"] = {
"includes":["id","group_id","offline_score","user_id"]
}
......
......@@ -112,7 +112,7 @@ def get_home_recommend_topic_ids(user_id,device_id,offset,size,query=None,query_
}
redis_client.hmset(redis_key,redis_dict)
# 每个session key保存15分钟
redis_client.expire(redis_key,15*60)
redis_client.expire(redis_key,60*60*24*3)
return recommend_topic_ids
except:
......
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