From 2c6ecc1f9181dc53932b4efda4def06646c4da9e Mon Sep 17 00:00:00 2001 From: "34047007@qq.com" <34047007@qq.com> Date: Mon, 10 Aug 2026 16:17:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tag=5Fids=20overlap=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=98=BE=E5=BC=8F=E6=A0=87=E6=B3=A8=20UUID=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E4=BF=AE=E5=A4=8D=20uuid[]=20&&=20text[]=20?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=20500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/search_engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/services/search_engine.py b/backend/app/services/search_engine.py index e3c72ec..6bdefff 100644 --- a/backend/app/services/search_engine.py +++ b/backend/app/services/search_engine.py @@ -507,8 +507,8 @@ class AdvancedSearchEngine: children = (await db.execute(select(GlobalTag.id).where(or_(*child_conds)))).scalars().all() all_tag_ids.update(children) uids = list(all_tag_ids) - from sqlalchemy.dialects.postgresql import array as _pg_array - conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids))) + from sqlalchemy.dialects.postgresql import array as _pg_array, UUID as _pg_uuid + conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids, type_=_pg_uuid()))) # 发表类型(PG JSONB contains) if pub_types: