Commit 7a21b9ae authored by lixiaofang's avatar lixiaofang

add

parent f1b5ab39
...@@ -451,7 +451,7 @@ class TopicUtils(object): ...@@ -451,7 +451,7 @@ class TopicUtils(object):
offset=offset, size=size, routing=routing) offset=offset, size=size, routing=routing)
for item in result_dict["hits"]: for item in result_dict["hits"]:
topic_id_list.append({"id": item["_source"]["id"], "highlight": item["highlight"]}) topic_id_list.append({"id": item["_source"]["id"], "highlight": item.get("highlight", {})})
return topic_id_list return topic_id_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