'commit'
This commit is contained in:
@@ -41,12 +41,6 @@ def select_all_data(index_name):
|
||||
print(f" 内容: {hit['_source'].get('user_input', '')}")
|
||||
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'])
|
||||
print("-" * 50)
|
||||
except Exception as e:
|
||||
print(f"查询出错: {e}")
|
||||
|
Reference in New Issue
Block a user