pmatseykanets/laravel-scout-postgres

Some support for ignoring accentuation?

neylsongularte opened this issue · 2 comments

"numeros" and "números" not match

My solution:

DB::statement('CREATE EXTENSION unaccent;');
DB::statement('CREATE TEXT SEARCH CONFIGURATION pt ( COPY = portuguese );');
DB::statement('ALTER TEXT SEARCH CONFIGURATION pt ALTER MAPPING FOR hword, hword_part, word WITH unaccent, portuguese_stem;');
DB::statement("ALTER DATABASE ${db} SET default_text_search_config TO pt");

Remove accent from /usr/share/postgresql/9.6/tsearch_data/portuguese.stop