Commit 88276024 authored by 段英荣's avatar 段英荣

Merge branch 'duanyr' into 'master'

Duanyr

See merge request alpha/physical!70
parents 2cc4bd27 63892c53
...@@ -221,18 +221,20 @@ class TopicUtils(object): ...@@ -221,18 +221,20 @@ class TopicUtils(object):
"include":["id","group_id","offline_score"] "include":["id","group_id","offline_score"]
} }
# for 压测 # for 压测
# q["sort"] = [ q["sort"] = [
# { {
# "_script":{ "_script":{
# "type":"number", "type":"number",
# "script":{ "script":{
"lang": "expression",
"source": "_score+doc['offline_score']"
# "lang":"painless", # "lang":"painless",
# "source":"_score+params._source.offline_score" # "source":"_score+params._source.offline_score"
# }, },
# "order":"desc" "order":"desc"
# } }
# } }
# ] ]
result_dict = ESPerform.get_search_results(ESPerform.get_cli(), sub_index_name="topic", query_body=q, result_dict = ESPerform.get_search_results(ESPerform.get_cli(), sub_index_name="topic", query_body=q,
offset=offset, size=size) offset=offset, size=size)
......
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