Commit 0affd82d authored by 段英荣's avatar 段英荣

add batch_recommend_user

parent 12be2b2d
......@@ -243,10 +243,11 @@ class UserUtils(object):
batch_query_list.append(q)
index_name = ESPerform.get_official_index_name("user","read")
search_header_dict = {'index': index_name, 'type': "_doc"}
query_body = ""
for query_item in batch_query_list:
query_body += "%s\n" % json.dumps(query_item)
query_body += "{}\n{}\n".format(json.dumps(search_header_dict),json.dumps(query_item))
result_dict = ESPerform.get_search_results(ESPerform.get_cli(), sub_index_name="user", query_body=query_body,
batch_search=True)
return result_dict
......
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