From bc0f5173c0b4a405bbdb1f77041425f58a69ff47 Mon Sep 17 00:00:00 2001 From: agatha Date: Sat, 9 May 2026 22:42:23 +0000 Subject: [PATCH] =?UTF-8?q?Feat:=20Substring=20tag=20search=20=E2=80=94=20?= =?UTF-8?q?match=20anywhere=20in=20tag=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes prefix-only LIKE to case-insensitive ILIKE with leading wildcard so queries like "at" now match "cat", "scatter", etc. Co-Authored-By: Claude Sonnet 4.6 --- api/app/repositories/tag_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/repositories/tag_repo.py b/api/app/repositories/tag_repo.py index 911b656..c2f5407 100644 --- a/api/app/repositories/tag_repo.py +++ b/api/app/repositories/tag_repo.py @@ -88,7 +88,7 @@ class TagRepository: query = select(Tag, count_subq.label("image_count")) if prefix: - query = query.where(Tag.name.like(f"{prefix}%")) + query = query.where(Tag.name.ilike(f"%{prefix}%")) if min_count > 0: query = query.where(count_subq >= min_count)