Search Postgresql Archives

Full-text search: Problems with dictionaries and periods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux