Commit 811bfabe authored by 段英荣's avatar 段英荣

modify offset=0

parent f591c486
......@@ -203,7 +203,7 @@ class TopicUtils(object):
"boost_mode": "sum",
"functions": functions_list
}
if query_type==TopicPageType.FIND_PAGE and len(filter_topic_id_list)>0:
if len(filter_topic_id_list)>0:
query_function_score["query"]["bool"]["must_not"] = {
"terms":{
"id": filter_topic_id_list
......
......@@ -64,7 +64,7 @@ def get_home_recommend_topic_ids(user_id,device_id,offset,size,query=None,query_
if redis_field_val_list[0]:
have_read_topic_id_list = list(json.loads(redis_field_val_list[0]))
topic_id_dict = TopicUtils.get_recommend_topic_ids(user_id, offset, size*size,query,query_type=TopicPageType.FIND_PAGE,filter_topic_id_list=have_read_topic_id_list)
topic_id_dict = TopicUtils.get_recommend_topic_ids(user_id, offset, size*size,query,query_type,filter_topic_id_list=have_read_topic_id_list)
have_read_group_id_set = set()
have_read_user_id_set = set()
unread_topic_id_dict = dict()
......@@ -221,7 +221,7 @@ def home_recommend(device_id="",user_id=-1,offset=0,size=10,query_type=TopicPage
if not isinstance(device_id,str):
device_id = ""
recommend_topic_ids = get_home_recommend_topic_ids(user_id,device_id,offset,size,query_type=query_type)
recommend_topic_ids = get_home_recommend_topic_ids(user_id,device_id,offset=0,size=size,query_type=query_type)
return {"recommend_topic_ids":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