diff --git a/utils/func_from_es_get_article.py b/utils/func_from_es_get_article.py index 2be16b3d415a9082722f4e1f481d4535dbf03ac2..4d5f60de5171c032d8bad0a39c7d5441343ab981 100644 --- a/utils/func_from_es_get_article.py +++ b/utils/func_from_es_get_article.py @@ -186,13 +186,13 @@ def get_device_num_from_es(word): def get_tractate_tags_from_es(doc_id): # tractate - results = es.get( - index='gm-dbmw-tractate-read', + results = es.get_source( + doc_id, + 'gm-dbmw-tractate-read', doc_type='tractate', - id=doc_id ) 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"]): article_dict = {