Merajul Arefin
f00ae350cd
fix(cli): multi-word and literal-wildcard search in odysseus-docs ( #7007 )
...
* fix(cli): multi-word and literal-wildcard search in odysseus-docs
odysseus-docs search wrapped the whole query in one `%{query}%` LIKE over title/current_content, so multi-word queries only matched the exact adjacent phrase and literal % / _ acted as SQL wildcards. Split on whitespace, AND per token, and escape LIKE wildcards with the shared escape_like_pattern() helper. Whitespace-only queries now match all documents, consistent with document-library search.
Fixes #2123 .
Tests: tests/cli/test_docs_cli_search.py (5 tests; multi-word, %, _, backslash, whitespace); 4 fail pre-fix, 5 pass post-fix. tests/cli full suite: 82 passed.
* test(cli): name whitespace-query search test accurately
The test passes a whitespace-only query, not an empty one; the old name implied a different input. Behavior is unchanged.
2026-11-02 23:48:14 +00:00
..
2026-05-31 23:58:26 +09:00
2026-05-31 23:58:26 +09:00
2026-08-12 04:59:46 +01:00
2026-10-05 01:37:49 +01:00
2026-06-15 15:57:33 +09:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-11-02 23:07:56 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-10-05 01:37:49 +01:00
2026-10-13 21:03:48 +01:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-10-29 15:05:58 +01:00
2026-10-21 21:40:05 +00:00
2026-10-13 21:03:48 +01:00
2026-06-03 08:56:48 +09:00
2026-07-08 19:30:41 +00:00
2026-06-28 10:57:11 +01:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-10-01 06:39:22 +01:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-07-23 14:49:02 +00:00
2026-08-27 10:20:36 +02:00
2026-10-01 01:34:26 +00:00
2026-09-11 06:04:19 +00:00
2026-09-21 06:54:03 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-05-31 23:58:26 +09:00
2026-11-01 03:19:59 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-05-31 23:58:26 +09:00
2026-10-05 01:37:49 +01:00
2026-06-08 09:58:52 +02:00
2026-09-17 10:07:40 +00:00
2026-09-17 10:07:40 +00:00
2026-06-08 09:58:52 +02:00
2026-08-16 04:17:58 +02:00
2026-08-24 17:38:40 +02:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-06-03 08:56:56 +09:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-07-11 05:26:42 +01:00
2026-06-16 14:04:56 +02:00
2026-06-03 14:11:21 +09:00
2026-06-08 00:33:50 +02:00
2026-09-25 17:35:47 +02:00
2026-11-02 23:48:14 +00:00
2026-10-28 14:33:23 +03:00
2026-06-03 08:59:30 +09:00
2026-10-28 14:39:41 +03:00
2026-06-03 14:11:35 +09:00
2026-07-11 03:05:17 +01:00
2026-06-29 14:26:46 +01:00
2026-06-03 14:06:42 +09:00
2026-06-03 14:10:58 +09:00
2026-06-05 08:50:33 +01:00
2026-06-03 08:57:41 +09:00
2026-06-03 14:10:54 +09:00
2026-06-03 14:11:38 +09:00
2026-09-30 12:12:58 +02:00
2026-06-03 14:06:49 +09:00
2026-06-03 14:12:35 +09:00
2026-08-16 23:28:26 +01:00
2026-06-04 12:51:48 +01:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 22:02:34 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 21:49:00 +00:00
2026-09-17 21:44:46 +00:00
2026-09-30 11:53:31 +02:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-10-28 17:37:10 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-21 06:54:03 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-22 11:31:45 +01:00
2026-09-11 06:04:19 +00:00
2026-06-03 08:57:03 +09:00
2026-10-01 02:11:53 +01:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-30 17:14:52 +02:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-17 22:46:33 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-10-15 09:29:41 +01:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-17 10:07:40 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-10-29 17:35:52 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-17 10:07:40 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00
2026-09-11 06:04:19 +00:00