I've created a text search configuration on my PostgreSQL server 9.3.5 like this following the postgresql documentation:
CREATE TEXT SEARCH CONFIGURATION french_noaccent ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION french_noaccent ALTER MAPPING FOR hword, hword_part, word WITH unaccent, french_stem;
I'm using it already one of my Django project database and can see it using \dF :
Schéma | Nom | Description
------------+------------------+---------------------------------------
pg_catalog | danish | configuration for danish language
pg_catalog | dutch | configuration for dutch language
pg_catalog | english | configuration for english language
pg_catalog | finnish | configuration for finnish language
pg_catalog | french | configuration for french language
pg_catalog | german | configuration for german language
pg_catalog | hungarian | configuration for hungarian language
pg_catalog | italian | configuration for italian language
pg_catalog | norwegian | configuration for norwegian language
pg_catalog | portuguese | configuration for portuguese language
pg_catalog | romanian | configuration for romanian language
pg_catalog | russian | configuration for russian language
pg_catalog | simple | simple configuration
pg_catalog | spanish | configuration for spanish language
pg_catalog | swedish | configuration for swedish language
pg_catalog | turkish | configuration for turkish language
public | french_noaccent |
public | spanish_noaccent |
However, when I try to use it on another project database (still on the same server), I get this error
text search configuration "public.french_noaccent" does not exist
LINE 1: ...rank_cd(watson_searchentry.search_tsv, to_tsquery('public.fr...
(Sorry I don't know how to get the full LINE :/)
Does somebody has any idea why is it so, and how I can make my text search config available on the 2nd database ?
Thank you very much
Edit (thanks to @doru): I created the text search config using the root account, but my projects database have a custom owner, when I use \dF with this account I can't see them in the list. I tried
ALTER TEXT SEARCH CONFIGURATION french_noaccent OWNER TO myuser;
but still can't see them. So I tried this with my custom account:
myuser=> CREATE TEXT SEARCH CONFIGURATION french_noaccenttst ( COPY = french );
CREATE TEXT SEARCH CONFIGURATION
myuser=> ALTER TEXT SEARCH CONFIGURATION french_noaccenttst ALTER MAPPING FOR hword, hword_part, word WITH unaccent, french_stem;
ERROR: text search dictionary "unaccent" does not exist
So I guess my question now is How can I make the unaccent dictionary available to my user ?
SHOW default_text_search_config;what do you get?SET default_text_search_config = 'public.french_noaccent';?