From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Tilmann Singer <tils-pgsql(at)tils(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: tsearch2 dictionary that indexes substrings? |
Date: | 2007-04-20 09:27:36 |
Message-ID: | Pine.LNX.4.64.0704201326180.12152@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 20 Apr 2007, Tilmann Singer wrote:
> Hi,
>
> In this http://archive.netbsd.se/?ml=pgsql-hackers&a=2006-10&t=2475028
> thread Teodor Sigaev describes a way to make tsearch2 index substrings
> of words:
>
>> Brain storm method:
>>
>> Develop a dictionary which returns all substring for lexeme, for
>> example for word foobar it will be 'foobar fooba foob foo fo oobar
>> ooba oob oo obar oba ob bar ba ar'
>
> Did anyone do that already?
AFAIK, no
>
> If I understand it correctly such a dictionary would require to write
> a custom C component - is that correct? Or could I get away with
> writing a plpgsql function that does the above and hooking that
> somehow into the tsearch2 config?
You need to write C-function, see example in
http://www.sai.msu.su/~megera/postgres/fts/doc/fts-intdict-xmp.html
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Tilmann Singer | 2007-04-20 10:21:51 | Re: tsearch2 dictionary that indexes substrings? |
Previous Message | Listmail | 2007-04-20 09:22:21 | Re: tsearch2 dictionary that indexes substrings? |