I'm using the following text search configuration:
CREATE TEXT SEARCH DICTIONARY tsd
(TEMPLATE = pg_catalog.SIMPLE);
CREATE TEXT SEARCH CONFIGURATION tsc_test
(COPY = german);
ALTER TEXT SEARCH CONFIGURATION tsc_test
ALTER MAPPING FOR asciihword, asciiword, hword, hword_asciipart, hword_part, word
WITH tsd;
I'm trying to perform full text search on a table, but I can't figure out how to define the text search configuration correctly. My problem is, that
SELECT to_tsvector('tsc_test', 'foo bar');
and
SELECT to_tsvector('tsc_test', 'foo_bar');
results in the same tsvector
object, because the _
(and others, like #(){}
, etc.) are interpreted as space symbols (see SELECT ts_debug ('tsc_test', 'foo_bar');
). I need them to be distinct, however.
Is there a way to adjust my text search configuration so it treats only spaces
as word separators and not anything else?