Commit 4512e3ec authored by lixiaofang's avatar lixiaofang

add logging

parent 27d86903
......@@ -116,7 +116,8 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
for item in result_dict["hits"]:
pictorial_id = item["_source"]["pictorial_id"]
topic_tag_list = item["_source"]["tag_list"]
pict_pictorial_ids_list.append(pictorial_id) #
logging.info("get pict_pictorial_ids_list:%s" % pict_pictorial_ids_list)
pict_pictorial_ids_list.append(item for item in pictorial_id) #
q["query"] = {
"terms": {
......@@ -138,7 +139,7 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
pictorial_id = item["_source"]["id"]
pictorial_id_list.append(pictorial_id)
logging.info("get pictorial_id_listt:%s" % pictorial_id_list)
logging.info("get pictorial_id_list:%s" % pictorial_id_list)
logging.info("get topic_tag_list:%s" % topic_tag_list)
if len(pict_pictorial_ids_list) < 10:
q["query"] = {
......@@ -160,7 +161,6 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
if len(result_dict["hits"]) > 0:
pictorial_id_list.append(item["_source"]["id"] for item in result_dict["hits"]) #
return {"pictorial_ids_list": pictorial_id_list}
else:
......
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