Commit 0c62fd1d authored by litaolemo's avatar litaolemo

update

parent 687968f2
......@@ -184,15 +184,24 @@ def get_device_num_from_es(word):
return tractate_content_num
def get_tractate_tags_from_es(doc_id):
body = {
"query":{
"bool":{
"filter":[
{"term":{"_id":doc_id}}
]
}
}
}
# tractate
results = es.get_source(
doc_id,
'gm-dbmw-tractate-read',
doc_type='tractate',
results = es.get(
index='gm-dbmw-answer-read',
doc_type='answer',
timeout='10s',
body=body
)
print(results)
return results
return results["hits"]['hits'][0]
def get_es_article_num(tag_dict, allow_tag=["first_demands", "second_demands", "first_solutions", "second_solutions","positions", "second_positions", "tags_v3"]):
article_dict = {
......
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