Commit 31c67025 authored by 段英荣's avatar 段英荣

modify

parent 7543e7ec
...@@ -145,6 +145,14 @@ class TopicUtils(object): ...@@ -145,6 +145,14 @@ class TopicUtils(object):
"filter": {"bool": { "filter": {"bool": {
"should": same_group_user_id_term_list}}, "should": same_group_user_id_term_list}},
"weight": 2 "weight": 2
},
{
"gauss": {
"update_time": {
"scale": "1d",
"decay": 0.5
}
}
} }
] ]
...@@ -158,12 +166,6 @@ class TopicUtils(object): ...@@ -158,12 +166,6 @@ class TopicUtils(object):
} }
} }
}, },
"gauss": {
"update_time": {
"scale": "1d",
"decay": 0.5
}
},
"score_mode": "sum", "score_mode": "sum",
"boost_mode": "sum", "boost_mode": "sum",
"functions": functions_list "functions": functions_list
...@@ -254,6 +256,14 @@ class TopicUtils(object): ...@@ -254,6 +256,14 @@ class TopicUtils(object):
"filter": {"term": { "filter": {"term": {
"user_id": topic_user_id}}, "user_id": topic_user_id}},
"weight": 1000 "weight": 1000
},
{
"gauss": {
"update_time": {
"scale": "1d",
"decay": 0.5
}
}
} }
] ]
if isinstance(topic_group_id,int) and topic_group_id > 0: if isinstance(topic_group_id,int) and topic_group_id > 0:
...@@ -280,12 +290,6 @@ class TopicUtils(object): ...@@ -280,12 +290,6 @@ class TopicUtils(object):
} }
} }
}, },
"gauss":{
"update_time":{
"scale":"1d",
"decay":0.5
}
},
"score_mode": "sum", "score_mode": "sum",
"boost_mode": "sum", "boost_mode": "sum",
"functions": functions_list "functions": functions_list
......
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