Commit 1a574134 authored by lixiaofang's avatar lixiaofang

add

parent b36ceeff
...@@ -721,7 +721,6 @@ class TopicUtils(object): ...@@ -721,7 +721,6 @@ class TopicUtils(object):
if sorts: if sorts:
q["sort"] = sorts q["sort"] = sorts
try: try:
result_dict = ESPerform.get_search_results( result_dict = ESPerform.get_search_results(
ESPerform.get_cli(), sub_index_name=index_name, ESPerform.get_cli(), sub_index_name=index_name,
...@@ -739,8 +738,6 @@ class TopicUtils(object): ...@@ -739,8 +738,6 @@ class TopicUtils(object):
"total_count": 0 "total_count": 0
} }
@classmethod @classmethod
def business_topic_ids(cls, filters, nfilters, sorts_by, offset=0, size=10, index_name="topic", filter_online=True): def business_topic_ids(cls, filters, nfilters, sorts_by, offset=0, size=10, index_name="topic", filter_online=True):
...@@ -755,22 +752,21 @@ class TopicUtils(object): ...@@ -755,22 +752,21 @@ class TopicUtils(object):
"must": must, "must": must,
"must_not": cls.process_nfilters(nfilters), "must_not": cls.process_nfilters(nfilters),
}, },
"multi_match":{ "multi_match": {
"fields" : ["title", "content"], "fields": ["title", "content"],
"type": "cross_fields", "type": "cross_fields",
"operator":"or", "operator": "or",
"query":query "query": query
} }
} }
} }
logging.info("get query business_topic:%s"%q)
if sorts_by: if sorts_by:
sorts = cls.process_sort(sorts_by) sorts = cls.process_sort(sorts_by)
if sorts: if sorts:
q["sort"] = sorts q["sort"] = sorts
try: try:
result_dict = ESPerform.get_search_results( result_dict = ESPerform.get_search_results(
ESPerform.get_cli(), sub_index_name=index_name, ESPerform.get_cli(), sub_index_name=index_name,
......
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