aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema_0074-add-users-full-text-search-index.sql
blob: dc743bd47f671a5076edc873c5f6e9e2ca8990c3 (plain)
1
2
3
4
5
6
CREATE INDEX CONCURRENTLY users_fulltext_idx on users USING GIN(
    to_tsvector(
        'DB_FULL_TEXT_SEARCH_CONFIG',
        translate(id || ' ' || coalesce(name,'') || ' ' || coalesce(email,'') || ' ' || coalesce(phone,''), '@.', '  ')
    )
);