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):
}
}
})
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 \
k.startswith("__gt") or k.startswith("__lt"):
if k.startswith("__gte"):
elif k.endswith("__gte") or k.endswith("__lte") or k.endswith("__gt") or k.endswith("__lt"):
if k.endswith("__gte"):
op = "gte"
filed = k[:-5]
elif k == "__lte":
elif k.endswith("__lte"):
op = "lte"
filed = k[:-5]
elif k == "__gt":
op = "lte"
elif k.endswith("__gt"):
op = "gt"
filed = k[:-4]
elif k == "__lt":
op = "lte"
elif k.endswith("__lt"):
op = "lt"
filed = k[:-4]
f.append({
......
......@@ -225,9 +225,10 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10):
}
},
"sort":[
{"total_vote_num":{"order":"desc"}},
{"total_vote_num": {"order": "desc"}},
{"create_time": {"order": "desc"}}
]
}
pict_pictorial_ids_list =[]
# 获取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