Commit 1a574134 authored by lixiaofang's avatar lixiaofang

add

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