| From: | Theron Luhn <theron(at)luhn(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Full-text search: Problems with dictionaries and periods |
| Date: | 2012-08-09 20:57:25 |
| Message-ID: | CAHYFdT9x3BJbnsqK1gUsn3Tw1ef+L02sC_-WWEAi+tNScyYA-w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anibal David Acosta | 2012-08-10 05:31:05 | change column data type of a big table |
| Previous Message | Mike Blackwell | 2012-08-09 18:02:24 | Re: Revoking table & function creation privileges |