Commit 350211f9 authored by 段英荣's avatar 段英荣

modify

parent 22e74fc6
...@@ -81,7 +81,8 @@ def query_tag(query,offset,size): ...@@ -81,7 +81,8 @@ def query_tag(query,offset,size):
for tips_item in result_dict["suggest"]["tips-suggest"]: for tips_item in result_dict["suggest"]["tips-suggest"]:
for hit_item in tips_item["options"]: for hit_item in tips_item["options"]:
if len(hit_item["contexts"])==2: if len(hit_item["contexts"])==2:
hit_item["_source"]["highlight"] = u'<ems>%s</ems>' % query hitLight = u'<ems>%s</ems>' % query
hit_item["_source"]["highlight"] = hit_item["_source"]["name"].replace(query,hitLight)
ret_list.append(hit_item["_source"]) ret_list.append(hit_item["_source"])
return {"tag_list": ret_list} return {"tag_list": ret_list}
......
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