Installera unaccent tillägg till din databas:
mydb=# CREATE EXTENSION unaccent;
Skapa en ny sökkonfiguration, baserad på en annan:
mydb=# CREATE TEXT SEARCH CONFIGURATION french_unaccent( COPY = french );
Infoga oaccent ordbok i din nya sökkonfiguration:
mydb=# ALTER TEXT SEARCH CONFIGURATION french_unaccent
ALTER MAPPING FOR hword, hword_part, word
WITH unaccent, french_stem;
Använd den här konfigurationen i din Django-fråga :
search = 'Car'
query_set = Article.objects.annotate(
search=SearchVector('content','name', config='french_unaccent')
).filter(search=SearchQuery(search, config='french_unaccent')))