Commit 3b9c7f6c authored by lixiaofang's avatar lixiaofang

add

parent 2702f1a9
...@@ -185,12 +185,18 @@ def pictorial_topic(topic_id=-1, offset=0, size=10): ...@@ -185,12 +185,18 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
q["_source"] = { q["_source"] = {
"includes": ["id", "update_time"] "includes": ["id", "update_time"]
} }
q["sort"] = { q["sort"] = [{
'update_time': { {
"real_user_activate_time": {
"order": "desc"
}
}
},
{'update_time': {
'order': 'desc' 'order': 'desc'
} }
}
} ]
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)
if len(result_dict["hits"]) > 0: if len(result_dict["hits"]) > 0:
for item in result_dict["hits"]: for item in result_dict["hits"]:
...@@ -259,8 +265,8 @@ def pictorial_topic(topic_id=-1, offset=0, size=10): ...@@ -259,8 +265,8 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
} }
}, },
{ {
"real_user_activate_time":{ "real_user_activate_time": {
"order":"desc" "order": "desc"
} }
}, },
{ {
......
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