Suggestion for a slight improvement in French search processing ("œ" and "æ" special characters)

SELECT to_tsvector('french', E'Cette oeuvre d\'art n\'est pas une œuvre.');
            to_tsvector             
------------------------------------
 'art':4 'cet':1 'oeuvr':2 'œuvr':9
(1 row)

For some reasons, I thought handling diacritics, ligatures and such was a solved problem when dealing with search… I guess not? :man_shrugging:

As a :fr: I definitely support that. Looks like we could use postgresql’s unaccent which remove accents and also deal with common ligatures.

SELECT to_tsvector('french', unaccent('œuvre poêle œuf Noël électroencéphalogramme æ Æ'));
                               to_tsvector                               
-------------------------------------------------------------------------
 'ae':6,7 'electroencephalogramm':5 'noel':4 'oeuf':3 'oeuvr':1 'poel':2
(1 row)
4 Likes