Full-text search: Problems with dictionaries and periods

Started by Theron Luhnover 13 years ago1 messagesgeneral
Jump to latest
#1Theron Luhn
theron@luhn.com

I made a custom synonym dictionary for my full-text search, using the
following code from the documentation.

CREATE TEXT SEARCH DICTIONARY my_synonym (
TEMPLATE = synonym,
SYNONYMS = my_synonyms
);

ALTER TEXT SEARCH CONFIGURATION english
ALTER MAPPING FOR asciiword WITH my_synonym, english_stem;

It works great, except on words with periods in them. For example, B.B.Q.:

=> select * from ts_debug('english', 'B.B.Q.');
alias | description | token | dictionaries | dictionary | lexemes
-------+-------------------+-------+--------------+------------+---------
file | File or path name | B.B.Q | {simple} | simple | {b.b.q}
blank | Space symbols | . | {} | |
(2 rows)

It interprets the string as a filename (that's what alias: file means,
right?), so the asciiword dictionary I set up above doesn't apply.

How can I change this?

— Theron