Commit 7b8e6799 authored by lixiaofang's avatar lixiaofang

add

parent 6d031f7e
...@@ -123,6 +123,8 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50): ...@@ -123,6 +123,8 @@ def get_suggest_tips(query, lat, lng, offset=0, size=50):
logging.info("get hit_item:%s" % hit_item) logging.info("get hit_item:%s" % hit_item)
if hit_item["_source"]["ori_name"] not in have_read_tips_set: if hit_item["_source"]["ori_name"] not in have_read_tips_set:
have_read_tips_set.add(hit_item["_source"]["ori_name"]) have_read_tips_set.add(hit_item["_source"]["ori_name"])
if "portrait" not in hit_item["_source"].keys():
hit_item["_source"]["portrait"] = ""
highlight_marks = u'<ems>%s</ems>' % query highlight_marks = u'<ems>%s</ems>' % query
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)
......
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