Re: Phrase search distance syntax

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: Phrase search distance syntax
Дата
Msg-id 57E5371E.7030601@sigaev.ru
обсуждение исходный текст
Ответ на Phrase search distance syntax  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Phrase search distance syntax  (Bruce Momjian <bruce@momjian.us>)
Re: Phrase search distance syntax  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Sorry to be asking another phrase search syntax question, and so close
> to final release, but ...
Really close...
>
> Why does the phrase distance operator assume <1> means adjacent words,
> and not <0>.  (FYI, <-> is the same as <1>.)
Because
1 it is a result of subtruction of word's positions
2 <0> could be used as special case like a word with two infinitives:
# create text search dictionary xx (template = 'ispell', 
DictFile='ispell_sample', AffFile='ispell_sample');
# alter text search configuration english ALTER MAPPING FOR asciiword WITH xx, 
english_stem;

# select to_tsvector('english', 'bookings');     to_tsvector
---------------------- 'book':1 'booking':1

# select to_tsvector('english', 'bookings') @@ 'book <0> booking'; ?column?
---------- t
(1 row)



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] Remove redundant if clause in standbydesc.c
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Phrase search distance syntax