Skip to content

Conversation

@sadorlovsky
Copy link

Problem

The original implementation used the LIKE operator for case-insensitive search which only supports case-insensitive matching for ASCII characters (A-Z), not Unicode. SQLite's LOWER() function also lacks Unicode support, so it wouldn't solve the problem. This caused searches to be case-sensitive for non-English content.

Example:

  • Searching for "анна" would NOT find "Анна"
  • Searching for "chloé" would NOT find "CHLOÉ"
  • Searching for "έλενα" would NOT find "Έλενα"

Solution

Use custom SQLite function lower_unicode() that uses Go's strings.ToLower() for proper Unicode case folding. All keyword search queries now use this function to ensure truly case-insensitive matching across all character sets.

Use custom lower_unicode() function for proper Unicode case folding
instead of SQLite's LIKE operator which only supports ASCII.
@sadorlovsky sadorlovsky force-pushed the fix-unicode-case-insensitive-search branch from f16e026 to 46ae680 Compare November 2, 2025 15:36
@WithoutPants
Copy link
Collaborator

I think we might want to consider adding/changing name indexes to accommodate this.

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.

2 participants