Commit 190cce87 authored by litaolemo's avatar litaolemo

update

parent a17bc0e9
...@@ -186,13 +186,13 @@ def get_device_num_from_es(word): ...@@ -186,13 +186,13 @@ def get_device_num_from_es(word):
def get_tractate_tags_from_es(doc_id): def get_tractate_tags_from_es(doc_id):
# tractate # tractate
results = es.get( results = es.get_source(
index='gm-dbmw-tractate-read', doc_id,
'gm-dbmw-tractate-read',
doc_type='tractate', doc_type='tractate',
id=doc_id
) )
print(results) print(results)
return results['hits']['hits'][0] return results
def get_es_article_num(tag_dict, allow_tag=["first_demands", "second_demands", "first_solutions", "second_solutions","positions", "second_positions", "tags_v3"]): def get_es_article_num(tag_dict, allow_tag=["first_demands", "second_demands", "first_solutions", "second_solutions","positions", "second_positions", "tags_v3"]):
article_dict = { 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