also support substring search

This commit is contained in:
Son 2021-08-19 18:07:11 +02:00
parent d8cb327b6e
commit 009e1edced
1 changed files with 1 additions and 0 deletions

View File

@ -227,6 +227,7 @@ def get_alias_infos_with_pagination_v3(
.filter(
or_(
Alias.email.ilike(f"%{query}%"),
Alias.note.ilike(f"%{query}%"),
# can't use match() here as it uses to_tsquery that expected a tsquery input
# Alias.ts_vector.match(query),
Alias.ts_vector.op("@@")(func.plainto_tsquery("english", query)),