Commit 3a1a9224 authored by Kai's avatar Kai

add logging

parent dfadc3c5
...@@ -445,7 +445,7 @@ class TopicUtils(object): ...@@ -445,7 +445,7 @@ class TopicUtils(object):
q = dict() q = dict()
q["query"] = dict() q["query"] = dict()
logging.warning("topic_tag_list:%s"%str(topic_tag_list)) # logging.warning("topic_tag_list:%s"%str(topic_tag_list))
functions_list = [ functions_list = [
{ {
"linear": { "linear": {
...@@ -514,13 +514,13 @@ class TopicUtils(object): ...@@ -514,13 +514,13 @@ class TopicUtils(object):
} }
if len(topic_tag_list) > 0: if len(topic_tag_list) > 0:
query_function_score["query"]["bool"]["should"] = { query_function_score["query"]["bool"]["must"] += {
"terms": { "terms": {
"tag_list": topic_tag_list "tag_list": topic_tag_list
} }
} }
if topic_user_id != -1: if topic_user_id != -1:
query_function_score["query"]["bool"]["should"] = { query_function_score["query"]["bool"]["must"] += {
"term": { "term": {
"user_id": topic_user_id "user_id": topic_user_id
} }
......
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