case and accent insensitive search under Python ?

Started by M4Xover 2 years ago2 messagesgeneral
Jump to latest
#1M4X
77M1C@gmx.com

Hi,

I'm considering to migrate to postgresql... ( still examining the pro/con )

It seem that is possible to make a search that is case and accent
insensitive.

|I've dig https://www.postgresql.org/docs/current/textsearch-intro.html
and other resources,|

|but I didn't find yet an example that demonstrate it. (from Python
would be even better :) )

Just to see if it's easy to implement.
|

|Thanks.|

|Max
|

|
|

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: M4X (#1)
Re: case and accent insensitive search under Python ?

M4X <77M1C@gmx.com> writes:

It seem that is possible to make a search that is case and accent
insensitive.
|I've dig https://www.postgresql.org/docs/current/textsearch-intro.html
and other resources,|
|but I didn't find yet an example that demonstrate it.

The text search functionality is already case-insensitive, but not
accent-insensitive (at least in the common built-in configurations).
To make it accent-insensitive, you can set up a custom configuration
using the "unaccent" module. See

https://www.postgresql.org/docs/current/unaccent.html

regards, tom lane