Full-text search: Problems with dictionaries and periods - Mailing list pgsql-general

From Theron Luhn
Subject Full-text search: Problems with dictionaries and periods
Date
Msg-id CAHYFdT9x3BJbnsqK1gUsn3Tw1ef+L02sC_-WWEAi+tNScyYA-w@mail.gmail.com
Whole thread Raw
List pgsql-general
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

pgsql-general by date:

Previous
From: Laszlo Fogas
Date:
Subject: slowness what only full vacuum can solve
Next
From: Rob Sargent
Date:
Subject: Re: change column data type of a big table