Commit 1601b62b authored by litaolemo's avatar litaolemo

update

parent 452fcb38
......@@ -321,12 +321,13 @@ def get_es_article_num(tag_dict):
"gte": 30
}
}
}],
}]
}
},
}
}
body["query"]["bool"]["must"].append({"term": {tag_type: tag_name}})
try:
results = es.search(
index='gm-dbmw-answer-read',
doc_type='answer',
......@@ -335,6 +336,9 @@ def get_es_article_num(tag_dict):
body=body
)
answer_content_num = results["hits"]["total"]
except:
print("answer has no %s" %tag_type)
answer_content_num = 0
body = {
"query": {
......
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