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: