Commit 498efd16 authored by 段英荣's avatar 段英荣

modify

parent ecd547fe
......@@ -228,7 +228,7 @@ class TopicUtils(object):
return []
@classmethod
def get_topic_detail_recommend_list(cls,user_id,topic_tag_list,topic_group_id,topic_user_id,offset,size):
def get_topic_detail_recommend_list(cls,user_id,topic_id,topic_tag_list,topic_group_id,topic_user_id,offset,size):
"""
:remark 帖子详情页推荐列表,缺少按时间衰减
:param user_id:
......@@ -262,6 +262,11 @@ class TopicUtils(object):
"should": query_tag_term_list,
"must": {
"range": {"content_level": {"gte": 3, "lte": 5}}
},
"must_not":{
"term":{
"id":topic_id
}
}
}
},
......
......@@ -150,7 +150,7 @@ def topic_detail_page_recommend(user_id=-1,topic_id=-1,topic_group_id=-1,topic_u
# 获取帖子标签列表
topic_tag_list = TopicUtils.get_topic_tag_id_list(topic_id)
result_list = TopicUtils.get_topic_detail_recommend_list(user_id,topic_tag_list,topic_group_id,topic_user_id,offset,size)
result_list = TopicUtils.get_topic_detail_recommend_list(user_id,topic_id,topic_tag_list,topic_group_id,topic_user_id,offset,size)
recommend_topic_ids_list = list()
if len(result_list)>0:
recommend_topic_ids_list = [item["_source"]["id"] for item in result_list]
......
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