搜索逻辑修复

This commit is contained in:
Miyamizu-MitsuhaSang 2025-11-08 21:28:42 +08:00
parent 9f9f462640
commit a1089067a6
2 changed files with 1 additions and 2 deletions

View File

@ -230,7 +230,7 @@ async def search_proverb_list(query_word: ProverbSearchRequest, user=Depends(get
@dict_search.post("/search/proverb") @dict_search.post("/search/proverb")
async def search_proverb(proverb_id: int = Form(...), user=Depends(get_current_user)): async def search_proverb(proverb_id: int = Form(...), user=Depends(get_current_user)):
result = await service.accurate_idiom_proverb(search_id=proverb_id, model=ProverbFr, result = await service.accurate_idiom_proverb(search_id=proverb_id, model=ProverbFr,
only_fields=["text", "chi_exp"]) only_fields=["id", "text", "chi_exp"])
return {"result": result} return {"result": result}

View File

@ -14,7 +14,6 @@ async def get_search_time(request: Request):
if not count: if not count:
await redis.set(key, value=0) await redis.set(key, value=0)
count = 0 count = 0
print(count, type(count))
return { return {
"count": int(count), "count": int(count),
} }