Commit 5a1d3b27 authored by lixiaofang's avatar lixiaofang

add

parent 95ea2075
...@@ -228,18 +228,26 @@ def pictorial_topic(topic_id=-1, offset=0, size=10): ...@@ -228,18 +228,26 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
"function_score": { "function_score": {
"query": query, "query": query,
"score_mode": "sum", "score_mode": "sum",
"boost_mode": "sum", "boost_mode": "replace",
"functions": functions_list "functions": functions_list
} }
} }
} }
q["_source"] = { q["_source"] = {
"includes": ["id", "tag_id"]} "includes": ["id", "tag_id"]}
q["sort"] = { q["sort"] = [
'update_time': { {
'order': 'desc' "_score": {
"order": "desc"
}
},
{
'update_time': {
'order': 'desc'
}} }
}
]
q["from"] = 0 q["from"] = 0
q["size"] = 10 q["size"] = 10
......
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