Commit 42c5485f authored by 黄凯's avatar 黄凯

Merge branch 'master' into 'test'

# Conflicts:
#   search/utils/topic.py
#   search/views/topic.py
parents 2c878e41 45d32a16
......@@ -158,14 +158,14 @@ class TopicUtils(object):
q["query"] = dict()
functions_list = [
{
"filter": {
"term": {
"language_type": 1
}
},
"weight": 60
},
# {
# "filter": {
# "term": {
# "language_type": 1
# }
# },
# "weight": 60
# },
{
"gauss": {
"create_time": {
......@@ -175,18 +175,18 @@ class TopicUtils(object):
},
"weight": 60
},
{
"filter": {
"constant_score":{
"filter":{
"term": {
"content_level": 6
}
}
}
},
"weight": 600
}
# {
# "filter": {
# "constant_score":{
# "filter":{
# "term": {
# "content_level": 6
# }
# }
# }
# },
# "weight": 600
# }
]
# if len(user_similar_score_list) > 0:
......@@ -242,7 +242,10 @@ class TopicUtils(object):
}
}
],
"minimum_should_match": 1
"minimum_should_match": 1,
"must_not": [
{"term": {"is_history":True}}
]
}
},
"score_mode": "sum",
......@@ -322,12 +325,12 @@ class TopicUtils(object):
# }
# },
{
"_score": {
"offline_score": {
"order": "desc"
}
},
{
"offline_score":{
"_score": {
"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