Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case in-sensitive search doesn't work for cyrrylic letters #4051

Closed
dobrKot opened this issue Oct 24, 2024 · 4 comments
Closed

Case in-sensitive search doesn't work for cyrrylic letters #4051

dobrKot opened this issue Oct 24, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@dobrKot
Copy link

dobrKot commented Oct 24, 2024

Describe the bug

When you create a record with word "text" and trying to search for "TeXt" - everything works correctly, but if you try to do the same with cyrrylics, like "текст" and "ТеКсТ" - search is not working.

Steps to reproduce

  1. Create a note with text "This is some text for example"
  2. Search for word "TeXt" - Success
  3. Create a note with text "Ось вам текст для прикладу"
  4. Search for word "ТеКсТ" - Fail

The version of Memos you're using.

0.22.5

Screenshots or additional context

CleanShot 2024-10-24 at 16 14 31@2x
CleanShot 2024-10-24 at 16 14 46@2x
CleanShot 2024-10-24 at 16 15 02@2x

@dobrKot dobrKot added the bug Something isn't working label Oct 24, 2024
@dobrKot
Copy link
Author

dobrKot commented Oct 25, 2024

One more addition to the topic, if you will use cyrrylic letters and the letter's case from note and search request will match - search will give you the results. So it's something connected with cyrrylics AND letter's case at the same time.

@JodhwaniMadhur
Copy link
Contributor

JodhwaniMadhur commented Nov 1, 2024

I don't think this really is a bug! This is more of a Cyrillic letters issue, coz ASCII value of текст is 209 130 208 181 208 186 209 129 209 130 and ASCII Value of TeKct is 208 162 208 181 208 154 209 129 208 162

Values converted using: https://www.browserling.com/tools/text-to-ascii

@RoccoSmit
Copy link
Contributor

As @JodhwaniMadhur mentioned, it looks like this is a limitation of the db (by choice). See: https://www.sqlite.org/faq.html#q18

@dobrKot
Copy link
Author

dobrKot commented Nov 1, 2024

@RoccoSmit hey, thank for the reponse. Yeah, it seems this is the sqllite limitation.

I have tried to go with postgres and the oficial docker-compose from the website but got same error as here:
#4014

So I had to change doker image from stable to latest to make everything work:

version: "3.0"
services:
memos:
image: neosmemo/memos:latest
restart: always
depends_on:
- db
ports:
- 5230:5230
environment:
- MEMOS_DRIVER=postgres
- MEMOS_DSN=user=memos password=secret dbname=memosdb host=db sslmode=disable

db:
image: postgres:16.1
restart: unless-stopped
volumes:
- "./database:/var/lib/postgresql/data/"
environment:
POSTGRES_USER: memos
POSTGRES_PASSWORD: secret
POSTGRES_DB: memosdb

All in all after changing DB from Sqlite to Postgress case insensitive search for Unicode started to work. So thank you for the help!

@dobrKot dobrKot closed this as completed Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants