element-hq / element-hq/synapse
Search is case-sensitive in non-English languages
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 46
Description
This issue has been migrated from [#3116](https://github.com/matrix-org/synapse/issues/3116).
---
### Description
It's hard to find the text you need in languages other than English as case becomes important.
### Steps to reproduce
- in a non-English room try to search for a word in lower and upper case
- the results would be quite different
- searching for an English word in upper and lower case shows the same result
Also, [here](https://github.com/matrix-org/synapse/blob/eb53439c4a4fbfc8714a187f3491a3bac584eae5/synapse/storage/search.py#L320) the FTS language is hardcoded as English so no stemming is supported for other languages. I propose lowercasing the event text before inserting it and do the same on querying.
### Version information
- **Homeserver**: own homeserver
- **Version**: 0.27.4
- **Install method**: package manager
- **Platform**: Debian 9.4 on a VDS
Contributor guide
Assessment
This issue has not been assessed yet.