Commit 9780e4f3 authored by 段英荣's avatar 段英荣

Merge branch 'test' of git.wanmeizhensuo.com:alpha/physical into test

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