Commit 42159f63 authored by 段英荣's avatar 段英荣

modify search

parent b6825d93
......@@ -334,13 +334,19 @@ class TopicUtils(object):
functions_list += [
{
"weight": 400,
"filter":{
"constant_score":{
"filter":{
"term": {"user_nick_name_pre": query.lower()}
}
}
}
},
{
"weight": 300,
"filter": {
"constant_score":{
"filter":{
"bool": {
"must": {
"term": {"content_level": 6},
......@@ -353,10 +359,14 @@ class TopicUtils(object):
]
}
}
}
}
},
{
"weight": 200,
"filter": {
"constant_score":{
"filter":{
"bool": {
"must": {
"term": {"content_level": 5},
......@@ -369,10 +379,14 @@ class TopicUtils(object):
]
}
}
}
}
},
{
"weight": 100,
"filter": {
"constant_score":{
"filter":{
"bool": {
"must": {
"term": {"content_level": 4},
......@@ -386,6 +400,8 @@ class TopicUtils(object):
}
}
}
}
}
]
q["sort"] = [
# {
......
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