Commit 5ccf3977 authored by zhanglu's avatar zhanglu

Merge branch 'jackie/test' into 'test'

帖子某些字段范围搜索

See merge request !215
parents 4d30f085 32ab1ed4
...@@ -629,6 +629,29 @@ class TopicUtils(object): ...@@ -629,6 +629,29 @@ class TopicUtils(object):
} }
} }
}) })
elif k.startswith("__gte") or k.startswith("__lte") or \
k.startswith("__gt") or k.startswith("__lt"):
if k.startswith("__gte"):
op = "gte"
filed = k[:-5]
elif k == "__lte":
op = "lte"
filed = k[:-5]
elif k == "__gt":
op = "lte"
filed = k[:-4]
elif k == "__lt":
op = "lte"
filed = k[:-4]
f.append({
"range": {
filed: {
op: v,
}
}
})
else: else:
if isinstance(v, list): if isinstance(v, list):
f.append({ f.append({
......
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