Commit 56f1a2ba authored by lixiaofang's avatar lixiaofang

修改bug

parent 397a968c
......@@ -943,6 +943,7 @@ class TopicUtils(object):
"total_count": 0
}
@classmethod
@classmethod
def business_filters(cls, filters, filter_online=True):
"""处理过滤器部分。"""
......@@ -973,6 +974,21 @@ class TopicUtils(object):
"match": {k: v}
})
elif k in ["create_time_gte", "create_time_lte"]:
if k == "create_time_gte":
op = "gte"
elif k == "create_time_lte":
op = "lte"
f.append({
"range": {
"create_time_val": {
op: v,
}
}
})
else:
if isinstance(v, list):
......
......@@ -19,7 +19,7 @@ def business_topic_search(filters, nfilters=None, sorts_by=None, offset=0, size=
try:
result_list = TopicUtils.business_topic_id(
result_list = TopicUtils.business_topic_ids(
filters=filters, nfilters=nfilters, sorts_by=sorts_by,
offset=offset, size=size, filter_online=False,
index_name="topic"
......
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