Prefix support for synonym dictionary

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Prefix support for synonym dictionary
Дата
Msg-id Pine.LNX.4.64.0907141922530.8065@sn.sai.msu.ru
обсуждение исходный текст
Ответы Re: Prefix support for synonym dictionary  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Hi there,

attached is our patch for CVS HEAD, which adds prefix support for synonym
dictionary.

Quick example:


> cat $SHAREDIR/tsearch_data/synonym_sample.syn
postgres        pgsql
postgresql      pgsql
postgre pgsql
gogle   googl
indices index*

=# create text search dictionary syn( template=synonym,synonyms='synonym_sample');
=# select ts_lexize('syn','indices'); ts_lexize
----------- {index}
(1 row)
=# create text search configuration tst ( copy=simple);
=# alter text search configuration tst alter mapping for asciiword with syn;
=# select to_tsquery('tst','indices'); to_tsquery
------------ 'index':*
(1 row)
=# select 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices'); ?column?
---------- t
(1 row)
    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] "could not reattach to shared memory" on Windows
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] "could not reattach to shared memory" on Windows