Commit 858621f1 authored by litaolemo's avatar litaolemo

update

parent ef925a79
...@@ -187,6 +187,7 @@ def get_device_num_from_es(word): ...@@ -187,6 +187,7 @@ def get_device_num_from_es(word):
def get_tractate_tags_from_es(doc_id): def get_tractate_tags_from_es(doc_id):
print(doc_id)
body = { body = {
"query": { "query": {
"bool": { "bool": {
...@@ -345,7 +346,8 @@ def get_user_post_from_mysql(): ...@@ -345,7 +346,8 @@ def get_user_post_from_mysql():
""" """
sql_res = con_sql_doris_prod(sql) sql_res = con_sql_doris_prod(sql)
for card_id in sql_res: for card_id in sql_res:
es_res = get_tractate_tags_from_es(card_id) print(card_id)
es_res = get_tractate_tags_from_es(card_id[0])
for position in es_res["_source"]["second_demands"]: for position in es_res["_source"]["second_demands"]:
if position in second_demands_count_dict: if position in second_demands_count_dict:
second_demands_count_dict[position] += 1 second_demands_count_dict[position] += 1
......
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