Commit 3fcaa1fd authored by 段英荣's avatar 段英荣

modify

parent a49fd04e
......@@ -68,7 +68,9 @@ class PickUtils(object):
"include": ["id"]
}
result_dict = ESPerform.get_search_results(ESPerform.get_cli(),sub_index_name="celebrity",query_body=q,offset=offset,size=size)
recommend_pick_celebrity_list = [item["id"] for item in result_dict["hits"]]
recommend_pick_celebrity_list = list()
if len(result_dict["hits"]) > 0:
recommend_pick_celebrity_list = [item["_source"]["id"] for item in result_dict["hits"]]
return recommend_pick_celebrity_list
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