From e068850e4c7b617e54b313f6b3f968f28e617d89 Mon Sep 17 00:00:00 2001 From: Miyamizu-MitsuhaSang <2510681107@qq.com> Date: Mon, 15 Sep 2025 17:40:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=8D=95=E8=AF=8D=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/search.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/api/search.py b/app/api/search.py index 6f76ead..548a8a4 100644 --- a/app/api/search.py +++ b/app/api/search.py @@ -35,6 +35,12 @@ async def search(request: Request, body: SearchRequest, user=Depends(get_current ) if not word_contents: raise HTTPException(status_code=404, detail="Word not found") + + # 修改freq + first_word = word_contents[0].word + current_freq = first_word.freq + await first_word.update(freq=current_freq+1) + pos_seen = set() pos_contents = [] contents: List[SearchItemFr] = []