Skip to content

Conversation

@iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Mar 5, 2024

SQLite search with LIKE is case-insensitive only for ASCII chars. To make it case-insensitive for all messages, create a new column msgs.txt_normalized defaulting to NULL (so we do not bump up the database size in a migration) and storing lowercased/normalized text there when the row is created/updated. When doing a search, search over IFNULL(txt_normalized, txt).

Close #5052

@iequidoo iequidoo marked this pull request as ready for review March 5, 2024 02:39
@iequidoo iequidoo requested review from link2xt and r10s March 5, 2024 02:40
@link2xt
Copy link
Collaborator

link2xt commented Apr 20, 2024

Let's merge this after merging peerchannels. @Simon-Laux is running peerchannels PR with current account without a backup AFAIK, so rebasing peerchannel migration on top of this migration will cause troubles.

@link2xt
Copy link
Collaborator

link2xt commented May 19, 2024

Peerchannels are merged, so this needs a rebase now.

@iequidoo iequidoo force-pushed the iequidoo/case-insensitive-search branch from 079394d to e38e21d Compare May 20, 2024 02:35
@iequidoo iequidoo force-pushed the iequidoo/case-insensitive-search branch from e38e21d to db29f42 Compare June 3, 2024 17:20
SQLite search with `LIKE` is case-insensitive only for ASCII chars. To make it case-insensitive for
all messages, create a new column `msgs.txt_normalized` defaulting to `NULL` (so we do not bump up
the database size in a migration) and storing lowercased/normalized text there when the row is
created/updated. When doing a search, search over `IFNULL(txt_normalized, txt)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search is case sensitive for non-ASCII messages

3 participants