http://www.postgresql.org/docs/9.3/static/textsearch-controls.html often refers to an optional regconfig parameter, but I can't find its possible values and their meanings. Where is it documented? If this can't be answered (e.g. because it depends on my installed database-components or like), how can I determine it myself?
I'd like a "plain text" regconfig, without any human-language transformation. What is the argument for it?
A text search configuration is a grouping of configuration objects: parsers, templates, and dictionaries. As far as I can tell the only configuration choices built-in are the language-specific ones like 'english' or 'finnish'.
You can see a list of configurations in your database via the \dF command in the psql command line tool, or via a query:
select * from pg_catalog.pg_ts_config;
Regarding a "plain text" configuration (#2), I'm not sure what you need but look at creating a custom dictionary. Perhaps start with the built-in "simple" dictionary and remove the stop words?
COMMENT ON TEXT SEARCH DICTIONARY simple IS 'simple dictionary: just lower case and check for stopword';
Reference: Configurations
The blog article Mastering PostgreSQL Tools: Full-Text Search and Phrase Search answers your question in full.
To summarize:
The regconfig is the Search Configuration object which is, itself, a collection of templates, parser dictionaries and stopwords. You can find it using the command \dF. To find out more about a particular regconfig, such as english/dutch use the command \dF+ dutch
For setting up own regconfig, you'll need access to the postgres.conf file, which isn't always allowed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With