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