Commit 220acc06 authored by 段英荣's avatar 段英荣

modifuy

parent 64166a30
......@@ -56,7 +56,11 @@ class PickUtils(object):
q = dict()
q["query"] = {
"bool":{
"must_not":filter_term_list,
"must_not":{
"terms":{
"id":have_read_pick_celebrity_ids
}
},
"must":[
{"term":{"pick_id_list":pick_id}},
{"term":{"is_online":True}}
......
......@@ -26,7 +26,7 @@ def pick_celebrity(user_id,pick_id,offset=0,size=10):
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
pass
recommend_pick_celebrity_list = PickUtils.get_recommend_celebrity_id_list(pick_id,have_read_pick_celebrity_ids,offset,size)
recommend_pick_celebrity_list = PickUtils.get_recommend_celebrity_id_list(pick_id,have_read_pick_celebrity_ids,0,size)
if len(recommend_pick_celebrity_list)>0 and user_id!=-1:
total_read_celebrity_ids = have_read_pick_celebrity_ids + recommend_pick_celebrity_list
......@@ -99,7 +99,7 @@ def pick_topic(user_id,pick_id,offset=0,size=10):
q["_source"] = {
"include":["id"]
}
result_dict = ESPerform.get_search_results(ESPerform.get_cli(),sub_index_name="topic",query_body=q,offset=offset,size=size)
result_dict = ESPerform.get_search_results(ESPerform.get_cli(),sub_index_name="topic",query_body=q,offset=0,size=size)
recommend_pick_topic_list = []
if len(result_dict["hits"]) > 0:
......
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