Commit e043da6c authored by 段英荣's avatar 段英荣

Merge branch 'master' of git.wanmeizhensuo.com:alpha/physical

parents 0480ef60 f5f2c418
...@@ -582,20 +582,37 @@ class TopicUtils(object): ...@@ -582,20 +582,37 @@ class TopicUtils(object):
} }
} }
}) })
elif k.endswith("__exclude"):
filed = k[:-5]
op = "lt"
f.append({
"range": {
filed: {
op: v,
}
}
})
op = "gt"
f.append({
"range": {
filed: {
op: v,
}
}
})
elif k.startswith("__gte") or k.startswith("__lte") or \ elif k.endswith("__gte") or k.endswith("__lte") or k.endswith("__gt") or k.endswith("__lt"):
k.startswith("__gt") or k.startswith("__lt"): if k.endswith("__gte"):
if k.startswith("__gte"):
op = "gte" op = "gte"
filed = k[:-5] filed = k[:-5]
elif k == "__lte": elif k.endswith("__lte"):
op = "lte" op = "lte"
filed = k[:-5] filed = k[:-5]
elif k == "__gt": elif k.endswith("__gt"):
op = "lte" op = "gt"
filed = k[:-4] filed = k[:-4]
elif k == "__lt": elif k.endswith("__lt"):
op = "lte" op = "lt"
filed = k[:-4] filed = k[:-4]
f.append({ f.append({
......
...@@ -225,9 +225,10 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10): ...@@ -225,9 +225,10 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10):
} }
}, },
"sort":[ "sort":[
{"total_vote_num":{"order":"desc"}}, {"total_vote_num": {"order": "desc"}},
{"create_time": {"order": "desc"}} {"create_time": {"order": "desc"}}
] ]
} }
pict_pictorial_ids_list =[] pict_pictorial_ids_list =[]
# 获取es链接对象 # 获取es链接对象
......
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