Commit 9bdf66c0 authored by 段英荣's avatar 段英荣

modify

parent 3928e7d9
...@@ -166,15 +166,15 @@ class TopicUtils(object): ...@@ -166,15 +166,15 @@ class TopicUtils(object):
}, },
"weight": 3 "weight": 3
}, },
{ # {
"linear": { # "linear": {
"create_time": { # "create_time": {
"scale": "1d", # "scale": "1d",
"decay": 0.99 # "decay": 0.99
} # }
}, # },
"weight": 500 # "weight": 500
} # }
] ]
if len(user_similar_score_list)>0: if len(user_similar_score_list)>0:
...@@ -307,18 +307,18 @@ class TopicUtils(object): ...@@ -307,18 +307,18 @@ class TopicUtils(object):
"includes":["id","group_id","offline_score","user_id","edit_tag_list"] "includes":["id","group_id","offline_score","user_id","edit_tag_list"]
} }
q["sort"] = [ q["sort"] = [
# { {
# "_script":{ "_script":{
# "type":"number", "type":"number",
# "script":{ "script":{
# "lang": "expression", "lang": "expression",
# "source": "_score+doc['offline_score']" "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"
# } }
# }, },
"_score" "_score"
] ]
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,
......
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