fix: tag_ids overlap 参数显式标注 UUID 类型,修复 uuid[] && text[] 搜索 500
This commit is contained in:
@@ -507,8 +507,8 @@ class AdvancedSearchEngine:
|
|||||||
children = (await db.execute(select(GlobalTag.id).where(or_(*child_conds)))).scalars().all()
|
children = (await db.execute(select(GlobalTag.id).where(or_(*child_conds)))).scalars().all()
|
||||||
all_tag_ids.update(children)
|
all_tag_ids.update(children)
|
||||||
uids = list(all_tag_ids)
|
uids = list(all_tag_ids)
|
||||||
from sqlalchemy.dialects.postgresql import array as _pg_array
|
from sqlalchemy.dialects.postgresql import array as _pg_array, UUID as _pg_uuid
|
||||||
conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids)))
|
conditions.append(GlobalLiterature.tag_ids.overlap(_pg_array(uids, type_=_pg_uuid())))
|
||||||
|
|
||||||
# 发表类型(PG JSONB contains)
|
# 发表类型(PG JSONB contains)
|
||||||
if pub_types:
|
if pub_types:
|
||||||
|
|||||||
Reference in New Issue
Block a user