Обсуждение: tsearch2 match substrings

Поиск
Список
Период
Сортировка

tsearch2 match substrings

От
Abbath
Дата:
Hi,

Is it possible using tsearch2 to match a substring of an element of a ts_vec
column?

For example: I have a table with a ts_vec, and I have a field with text, and
if there is a value in the field "I would like to match the beginning of the
words" - and the ts_vec has " 'like':3 'match':5 'begin':7 ...etc" then it
would be cool to create a query, which give me a headline for "begin" if I
just use the "beg" (or "beg*" ) search expression.

Is there a way to solve this?

Thanks in advance.

Abbath


Re: tsearch2 match substrings

От
Teodor Sigaev
Дата:
> words" - and the ts_vec has " 'like':3 'match':5 'begin':7 ...etc" then it
> would be cool to create a query, which give me a headline for "begin" if I
> just use the "beg" (or "beg*" ) search expression.

Potentially yes, but without index support and it's needed to write your
operator/function.

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

Re: tsearch2 match substrings

От
Abbath
Дата:
Hello Teodor,

Friday, March 3, 2006, 5:09:45 PM, you wrote:

>> words" - and the ts_vec has " 'like':3 'match':5 'begin':7 ...etc" then it
>> would be cool to create a query, which give me a headline for "begin" if I
>> just use the "beg" (or "beg*" ) search expression.

> Potentially yes, but without index support and it's needed to write your
> operator/function.

Could You write some sample how do You mean?

Thanks in advance.

--
Abbath