Commit 5c389619 authored by zhanglu's avatar zhanglu

Merge branch 'jackie/test' into 'master'

帖子某些字段范围搜索

See merge request alpha/physical!214
parents 590c40fc 32ab1ed4
......@@ -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:
if isinstance(v, list):
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