Commit 2a5e3727 authored by lixiaofang's avatar lixiaofang

add query

parent 835e019f
......@@ -144,13 +144,13 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
"must": [{
"term": {
"is_online": True}
},
},
{"term": {
"is_delete": False}
},
{"terms": {
"tag_id": [211302, 195275, 195246, 317175, 274332, 96, 345697, 336486, 473577, 336051,
847034, 482012]# topic_tag_list }
847034, 482012] # topic_tag_list }
}}
]
}
......@@ -159,12 +159,12 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
q["_source"] = {
"include": ["id", "tag_id"]}
q["sort"] = {
'update_time': {
'order': 'desc'
'update_time': {
'order': 'desc'
} }
q["form"] = 0
q["size"] = 10
}}
q["from"] = 0
q["size"] = 3
result_dict = ESPerform.get_search_results(es_cli_obj, "pictorial", q, offset, size)
if len(result_dict["hits"]) > 0:
......
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