Commit 33ce4516 authored by lixiaofang's avatar lixiaofang

add

parent f91b05bf
...@@ -130,13 +130,12 @@ def pictorial_topic(topic_id=-1, offset=0, size=10): ...@@ -130,13 +130,12 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
} }
result_dict = ESPerform.get_search_results(es_cli_obj, "pictorial", q, offset, size) result_dict = ESPerform.get_search_results(es_cli_obj, "pictorial", q, offset, size)
pictorial_id_list = []
if len(result_dict["hits"]) > 0: if len(result_dict["hits"]) > 0:
pictorial_id_list = [item["_source"]["id"] for item in result_dict["hits"]] # pictorial_id_list = [item["_source"]["id"] for item in result_dict["hits"]] #
pictorial_ids_list.append(pictorial_id_list) pictorial_ids_list.append(pictorial_id_list)
if len(pictorial_ids_list) < 10: if len(pictorial_ids_list) < 10:
q["query"] = { q["query"] = {
"terms": { "terms": {
......
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