question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add accent insensitive query mode

See original GitHub issue

Problem

Currently there is a possibility to search a database case insensitive with QueryMode.insensitive. I would like to additionally search the database accent insensitive.

Suggested solution

Extend the QueryMode.insensitive to be also accent insensitive or add the QueryMode.accentInsensitive with the possibility to combine the mode with QueryMode.insensitive (it would probably be good to rename QueryMode.insensitive to QueryMode.caseInsensitive)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:16
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
friebetillcommented, Apr 15, 2021

Thanks for your answer! So far I haven’t implemented anything, but I will probably follow this Stack Overflow answer and use the extension unaccent to solve it. I hope that this extension can be installed directly in Postgres and then used with the Prisma client via $queryRaw.

Of course, the approach does not work for the other databases and the first search result, e.g. for MySQL is not promising.

2reactions
theduardomacielcommented, Apr 10, 2022

@friebetill If you’ve had any success with installing the module and using the function in a $rawQuery (and still have access to it, because it’s been a while since you posted), please share here because I’m racking my brains to find out how to implement this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accent-Insensitive Query and Sort
You use the nls_sort session parameter to specify a case-insensitive or accent-insensitive sort, this is accomplished by: Appending a " _CI" to an...
Read more >
Configuring SQL Server Accent-Insensitivity - CodeProject
This article describes the steps to re-configure SQL Server so that queries return accent-insensitive results.
Read more >
How to make an accent insensitive `MATCH() AGAINST ...
Another solution is to use a certain collation for your varchar column, let's say latin1_general_ci . This way, the search will always convert ......
Read more >
How to do case-insensitive and accent-insensitive search in ...
Case-insensitive search; Accent-insensitive search; Sort rows regardless of case or accents; Define search and sorting rules for a column ...
Read more >
Accent Insensitive Search in Sitefinity - Progress Community
For Lucene Search service: NOTE: The below solution will replace any accented characters with their unaccented equivalents only during indexing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found