lanny xu commited on
Commit
6186830
·
1 Parent(s): 6da2725

optimize query speed

Browse files
Files changed (1) hide show
  1. document_processor.py +6 -0
document_processor.py CHANGED
@@ -275,6 +275,12 @@ class DocumentProcessor:
275
  if not os.path.isabs(real_uri):
276
  real_uri = os.path.abspath(real_uri)
277
  print(f"📂 将相对路径转换为绝对路径: {real_uri}")
 
 
 
 
 
 
278
 
279
  mode_name = "Lite (Local File)" if is_local_file else "Cloud (HTTP)"
280
  print(f"🔄 正在连接 Milvus {mode_name} ({real_uri})...")
 
275
  if not os.path.isabs(real_uri):
276
  real_uri = os.path.abspath(real_uri)
277
  print(f"📂 将相对路径转换为绝对路径: {real_uri}")
278
+
279
+ # 确保父目录存在
280
+ parent_dir = os.path.dirname(real_uri)
281
+ if parent_dir and not os.path.exists(parent_dir):
282
+ print(f"📂 创建 Milvus 存储目录: {parent_dir}")
283
+ os.makedirs(parent_dir, exist_ok=True)
284
 
285
  mode_name = "Lite (Local File)" if is_local_file else "Cloud (HTTP)"
286
  print(f"🔄 正在连接 Milvus {mode_name} ({real_uri})...")