From 6f521287c0c3cdff3d05459af381e042ac40196e Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 10 May 2025 00:58:59 +0800 Subject: [PATCH] . --- app/api/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/search.py b/app/api/search.py index bf7a505..2794980 100644 --- a/app/api/search.py +++ b/app/api/search.py @@ -22,8 +22,8 @@ def search_docs(request: QueryRequest, user_id: str = Query(..., description=" try: logger.info(f"Received search request from user: {user_id} with query: {request.query}") - # 构建索引路径 - index_path = os.path.join("index_data", f"{user_id}.index") + # 修正后的索引路径,使用用户ID并且不带 ".index" 后缀 + index_path = os.path.join("index_data", user_id) # 仅使用 user_id 作为文件夹名 logger.info(f"Looking for index at path: {index_path}") # 检查索引是否存在