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

Merge branch 'test' into 'master'

# Conflicts:
#   trans2es/mapping/topic-v1.json
parents d366ed78 4526073e
......@@ -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