Commit 3a2ea377 authored by Kai's avatar Kai

update

parent 94907185
...@@ -461,7 +461,7 @@ class TopicUtils(object): ...@@ -461,7 +461,7 @@ class TopicUtils(object):
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"range": {"content_level": {"gte": 3, "lte": 6}}}, {"range": {"content_level": {"gte": 5, "lte": 6}}},
{"term": {"is_online": True}}, {"term": {"is_online": True}},
{"term": {"is_deleted": False}} {"term": {"is_deleted": False}}
], ],
...@@ -510,6 +510,9 @@ class TopicUtils(object): ...@@ -510,6 +510,9 @@ class TopicUtils(object):
} }
} }
q["query"]["function_score"] = query_function_score q["query"]["function_score"] = query_function_score
q["collapse"] = {
"field": "user_id"
}
q["_source"] = { q["_source"] = {
"includes": ["id", "pictorial_id", "user_id", "_score"] "includes": ["id", "pictorial_id", "user_id", "_score"]
} }
......
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