WeKnora/internal
coderdailyone 0ad08d41be fix(repository): make message keyword search work on SQLite and MySQL
SearchMessagesByKeyword filtered with `messages.content ILIKE ?`, which is
PostgreSQL-only syntax. On SQLite (the Lite build) and MySQL the query fails
with `near "ILIKE": syntax error`, so POST /api/v1/messages/search returned
HTTP 500 in both keyword and the default hybrid modes. The session-list
search (QueryPaged) was already made dialect-aware for the same reason; this
path was missed.

Pick the LIKE expression per dialect — ILIKE on Postgres, LOWER() LIKE
LOWER() elsewhere — and add an explicit `ESCAPE ?` bound to likeEscapeChar so
escapeLikeKeyword's backslash escapes are honored on SQLite, which has no
default LIKE escape character (a no-op on Postgres/MySQL, where `\` is
already the default).

Regression tests in message_search_test.go run against in-memory SQLite:
TestSearchMessagesByKeywordMatchesOnSQLite and
TestSearchMessagesByKeywordTreatsWildcardsLiterally both fail on the old code
with the ILIKE syntax error and pass with the fix.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRrBenkCCr4pacMNwR4NuG
2026-09-17 12:27:52 +08:00
..
agent feat(web-search): add Serply provider 2026-09-17 12:25:09 +08:00
application fix(repository): make message keyword search work on SQLite and MySQL 2026-09-17 12:27:52 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
browserskill fix(browser): align BrowserSkill 0.3.0 and repair task lifecycle 2026-09-17 11:54:12 +08:00
common fix(markdown): sanitize invalid UTF-8 and NUL bytes 2026-08-31 12:24:35 +08:00
config feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
container feat(web-search): add Serply provider 2026-09-17 12:25:09 +08:00
database fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
datasource feat(datasource): add Confluence sync (#3287) 2026-09-16 14:38:16 +08:00
embedpolicy fix(embed): enforce host origin allowlists on framed pages 2026-09-14 18:03:57 +08:00
errors feat(agent): keep long sandbox turns from truncating, overflowing, or rewriting files 2026-09-02 22:09:09 +08:00
event feat(sandbox): stream live shell and install command output 2026-09-12 10:16:39 +08:00
filetransport refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
handler fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
im fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
infrastructure feat(web-search): add Serply provider 2026-09-17 12:25:09 +08:00
ipclass fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
logger fix(sandbox): record product-level Langfuse spans and detach idle sweeps 2026-08-31 19:42:32 +08:00
mcp fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
middleware fix(embed): enforce host origin allowlists on framed pages 2026-09-14 18:03:57 +08:00
modelcontext feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
models fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
ratelimit feat(embed): add backend embed channels with auth and rate limiting (#1657) 2026-06-12 23:10:39 +08:00
router fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
runtime fix(redis): harden TLS tests and surface TLS config at startup 2026-07-06 23:04:52 +08:00
sandbox feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
searchutil fix(chat): keep OCR/caption text of scanned-page image hits in merge (#3064) 2026-09-07 11:38:47 +08:00
storageallowlist fix(storage): align default provider fallback with STORAGE_ALLOW_LIST 2026-07-15 11:05:00 +08:00
storageurl refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
stream fix(chat): preserve steering continuity and composer focus 2026-09-09 20:15:23 +08:00
textconv fix: remove GPL converter and bundle third-party license sources 2026-09-08 15:19:10 +08:00
tracing/langfuse fix(milvus): preserve keyword retrieval scores 2026-09-17 11:59:40 +08:00
types fix(repository): make message keyword search work on SQLite and MySQL 2026-09-17 12:27:52 +08:00
utils fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00