import json # 文件路径 file_path = r"d:\dsWork\dsProject\dsLightRag\Topic\JiHe\kv_store_text_chunks.json" # 读取并解析JSON文件 with open(file_path, 'r', encoding='utf-8') as f: text_chunks = json.load(f) # 遍历所有文本块 for chunk_id, chunk_info in text_chunks.items(): print(f"块ID: {chunk_id}") print(f"所属文档ID: {chunk_info['full_doc_id']}") print(f"块序号: {chunk_info['chunk_order_index']}") print(f"Token数量: {chunk_info['tokens']}") #print(f"内容预览: {chunk_info['content'][:100]}...") # 打印前100字符 print(f"来源文件: {chunk_info['file_path']}") print("---")