search结果根据相似度排序

This commit is contained in:
Pan Qiancheng 2025-04-25 18:55:55 +08:00
parent c29909ad10
commit 3553345f50
1 changed files with 2 additions and 0 deletions

View File

@ -102,4 +102,6 @@ def search_error(query: ErrorQuery):
"matched_layers": db_entry["layers"] "matched_layers": db_entry["layers"]
}) })
# 还需要根据相似度排序
results.sort(key=lambda x: x["similarity"], reverse=True)
return results return results