diff --git a/dsSchoolBuddy/ElasticSearch/T4_SelectAllData.py b/dsSchoolBuddy/ElasticSearch/T4_SelectAllData.py index 99418857..02e4e411 100644 --- a/dsSchoolBuddy/ElasticSearch/T4_SelectAllData.py +++ b/dsSchoolBuddy/ElasticSearch/T4_SelectAllData.py @@ -42,11 +42,11 @@ def select_all_data(index_name): print(f" 标签: {hit['_source'].get('tags', '')}") print(f" 时间戳: {hit['_source'].get('timestamp', '')}") # 在循环中添加打印完整数据结构的代码 - if i == 1: # 只打印第一条数据的完整结构 - print("完整数据结构:") - import pprint - pp = pprint.PrettyPrinter(indent=4) - pp.pprint(hit['_source']) + # if i == 1: # 只打印第一条数据的完整结构 + # print("完整数据结构:") + # import pprint + # pp = pprint.PrettyPrinter(indent=4) + # pp.pprint(hit['_source']) print("-" * 50) except Exception as e: print(f"查询出错: {e}")