Merajul Arefin
04f8546d9d
fix(search): gallery library per-word search with LIKE escaping ( #6584 )
...
Gallery search built a single `%{search}%` LIKE, so multi-word queries only matched the exact adjacent phrase ("red car" missed "a car that is red") and literal % / _ acted as SQL wildcards. Split on whitespace and require each token to match (prompt OR tags OR ai_tags), escaping LIKE wildcards per token; same escaping for the tag filter. Promote _escape_like to public escape_like_pattern() shared helper.
Part of #2123 .
Tests: tests/test_gallery_search_multiword.py (5 tests); 4 fail pre-fix, 5 pass post-fix. Neighbors (session_search, gallery null-user, shims): 25 passed.
2026-10-31 13:43:20 +00:00
..
2026-07-21 12:39:27 +02:00
2026-07-21 12:38:32 +02:00
2026-07-21 12:40:09 +02:00
2026-09-11 06:04:19 +00:00
2026-10-31 13:21:10 +00:00
2026-10-27 18:12:05 +00:00
2026-10-31 13:43:20 +00:00
2026-10-14 08:41:38 +01:00
2026-10-27 22:50:35 -06:00
2026-10-13 21:02:16 +01:00
2026-10-07 19:50:03 +03:00
2026-10-27 17:25:25 +00:00
2026-10-13 13:59:04 +00:00
2026-10-24 23:41:29 +02:00
2026-10-02 03:00:46 +01:00
2026-08-03 20:44:31 +02:00
2026-05-31 23:58:26 +09:00
2026-06-11 00:43:49 +02:00
2026-07-21 12:39:27 +02:00
2026-06-15 18:05:15 +01:00
2026-10-13 13:59:04 +00:00
2026-10-27 18:33:23 +01:00
2026-08-06 02:33:50 -06:00
2026-10-27 18:09:14 +01:00
2026-10-28 00:31:42 +00:00
2026-10-27 18:12:05 +00:00
2026-09-22 13:12:19 +01:00
2026-07-21 12:38:32 +02:00
2026-10-23 13:18:49 -06:00
2026-07-21 12:40:09 +02:00
2026-07-07 00:51:34 +00:00
2026-10-30 19:43:50 +00:00
2026-10-28 06:31:50 +03:00
2026-10-31 12:59:17 +00:00
2026-06-08 10:19:18 +02:00
2026-06-08 10:19:18 +02:00
2026-06-15 10:32:51 +02:00
2026-08-04 03:54:55 -06:00
2026-08-04 03:54:55 -06:00
2026-10-28 19:30:08 +00:00
2026-09-23 12:53:06 +01:00
2026-10-01 01:34:26 +00:00
2026-09-29 18:21:18 +02:00
2026-10-01 01:34:26 +00:00
2026-06-15 17:44:10 +01:00
2026-06-08 09:58:52 +02:00
2026-10-28 00:23:18 +03:00
2026-06-28 14:07:23 +00:00
2026-06-28 14:07:23 +00:00
2026-07-04 13:36:35 +02:00
2026-10-15 11:57:00 +00:00
2026-08-11 02:24:55 -06:00
2026-06-30 17:52:14 +02:00
2026-10-27 22:50:35 -06:00
2026-07-20 13:52:30 +02:00
2026-10-01 19:45:59 +02:00
2026-08-14 08:10:30 +01:00
2026-09-11 06:04:19 +00:00
2026-06-28 14:34:11 +01:00
2026-07-28 22:26:29 +02:00
2026-10-30 15:09:09 +00:00
2026-10-26 16:21:22 +00:00
2026-06-05 13:17:43 +02:00
2026-10-31 13:34:05 +00:00
2026-06-09 01:24:30 +02:00
2026-08-17 10:07:17 +08:00
2026-05-31 23:58:26 +09:00
2026-10-29 02:02:47 +00:00
2026-08-03 20:44:00 +02:00
2026-08-03 20:44:31 +02:00
2026-09-11 06:04:19 +00:00