Commit c2f1481a authored by lixiaofang's avatar lixiaofang

判断类型

parent 150b402a
...@@ -70,7 +70,8 @@ def get_suggest_tips(query, agile_tag_type): ...@@ -70,7 +70,8 @@ def get_suggest_tips(query, agile_tag_type):
highlight_name = hit_item["_source"]["highlight_name"] highlight_name = hit_item["_source"]["highlight_name"]
ret_list.append( ret_list.append(
[{"ori_name": ori_name, "results_num": results_num, "highlight": highlight_name}]) [{"agile_tag_id": agile_tag_id, "ori_name": ori_name, "results_num": results_num,
"highlight": highlight_name}])
else: else:
for tips_item in result_dict["suggest"]["tips-suggest"]: for tips_item in result_dict["suggest"]["tips-suggest"]:
...@@ -81,11 +82,13 @@ def get_suggest_tips(query, agile_tag_type): ...@@ -81,11 +82,13 @@ def get_suggest_tips(query, agile_tag_type):
hit_item["_source"]["highlight_name"] = hit_item["_source"]["ori_name"].replace(query, hit_item["_source"]["highlight_name"] = hit_item["_source"]["ori_name"].replace(query,
highlight_marks) highlight_marks)
ori_name = hit_item["_source"]["ori_name"] ori_name = hit_item["_source"]["ori_name"]
agile_tag_id = hit_item["_source"]["agile_tag_id"]
results_num = hit_item["_source"]["results_num"] results_num = hit_item["_source"]["results_num"]
highlight_name = hit_item["_source"]["highlight_name"] highlight_name = hit_item["_source"]["highlight_name"]
ret_list.append( ret_list.append(
[{"ori_name": ori_name, "results_num": results_num, "highlight": highlight_name}]) [{"agile_tag_id": agile_tag_id, "ori_name": ori_name, "results_num": results_num,
"highlight": highlight_name}])
return ret_list return ret_list
except: 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