Commit 8f630226 authored by lixiaofang's avatar lixiaofang

add query

parent 33ff44e9
......@@ -141,19 +141,18 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
if len(pict_pictorial_ids_list) < 10:
q["query"] = {
"bool": {
"must":[{
"must": [{
"term": {
"is_online": True
"is_online": True}
},
"term": {
"is_delete": False
{"term": {
"is_delete": False}
},
"terms": {
{"terms": {
"tag_id": [211302, 195275, 195246, 317175, 274332, 96, 345697, 336486, 473577, 336051,
847034, 482012]
# topic_tag_list
}
}]
847034, 482012]# topic_tag_list }
}}
]
}
}
......@@ -177,11 +176,11 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
return {"pictorial_ids_list": pictorial_id_list}
else:
else:
return {"pictorial_ids_list": pictorial_id_list}
return {"pictorial_ids_list": pictorial_id_list}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"pictorial_ids_list": []}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"pictorial_ids_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