Commit 91465585 authored by lixiaofang's avatar lixiaofang

add

parent b1b93c4b
......@@ -105,23 +105,23 @@ def pictorial_topic(topic_id=-1, offset=0, size=10):
q = {}
# 获取帖子从属的画报
q["query"] = {
"bool":{
"must":[
"bool": {
"must": [
{
"term": {
"id": topic_id
}
},
{
"term":{
"is_online":True
"term": {
"is_online": True
}
}
],
"must_not":[
"must_not": [
{
"term":{
"is_history":True
"term": {
"is_history": True
}
}
]
......@@ -252,24 +252,25 @@ def pictorial_topic_sort(pictorial_id=-1, offset=0, size=10):
"query": {
"bool": {
"must": [
{"term": {"pictorial_id": pictorial_id}},
{"term": {"is_online": True}},
{"term": {"is_deleted": False}},
{
"nested": {
"path": "related_billboard",
"query": {
"bool": {
"must": [
{
"term": {
"pictorial_id": pictorial_id
}
}
]
}
}
}
}
# {
# "nested": {
# "path": "related_billboard",
# "query": {
# "bool": {
# "must": [
# {
# "term": {
# "pictorial_id": pictorial_id
# }
# }
# ]
# }
# }
# }
# }
]
}
},
......
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