Commit 56f1a2ba authored by lixiaofang's avatar lixiaofang

修改bug

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