Re: tsearch2 dictionary for statute cites

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: tsearch2 dictionary for statute cites
Дата
Msg-id 49DB5509.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Re: tsearch2 dictionary for statute cites  (Oleg Bartunov <oleg@sai.msu.su>)
Ответы Re: tsearch2 dictionary for statute cites  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-general
Oleg Bartunov <oleg@sai.msu.su> wrote:
> contrib/test_parser - an example parser code.

Using that as a template, I seem to be on track to use the regexp.c
code to pick out statute cites from the text in my start function, and
recognize when I'm positioned on one in my getlexeme (GETTOKEN)
function, delegating everything before, between, and after statute
cites to the default parser.  (I really didn't want to copy/paste and
modify the whole default parser.)

That leaves one question I'm still pretty fuzzy on -- how do I go
about having a statute cite in a tsquery match the entire statute cite
from a tsvector, or delimited leading portions of it, without having
it match shorter portions?

For example:

If the document text contains '341.15(3)' I want to find it with a
search string of '341', '341.15', '341.15(3)' but not '341.15(3)(b)',
'341.1', or '15'.  How do I handle that?  Do I have to build my
tsquery values myself as text and cast to tsquery, or is there
something more graceful that I'm missing?

-Kevin

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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: [HACKERS] string_to_array with empty input
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: tsearch2 dictionary for statute cites