Searching for substring with tsearch(1/2)

From: Urmo <urmo(at)xwm(dot)ee>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Searching for substring with tsearch(1/2)
Date: 2003-12-09 12:07:53
Message-ID: br4duk$o6b$1@kadri.ut.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

there seems to be no way of searching partial matches with tsearch.
Would it be hard to implement prefix based matching, i.e.
"hu" matches "human", "humanity", "humming", "huge"? With some hacking I
managed to disable morphology part from tsearch1 (database contained
multiple languages in a single table so morphology could not be used)
and it run happily for a year. But now I needed prefix based substring
match and I'm kinda lost. I tried using fulltextindex but it took ages
to create the index with 100K table (query run about a day before I lost
my pacience and canceled it). I even modified it to lose suffixes and
index only full words but it was still too slow (50K records were
indexed in 24h).

Can anybody help or point out right direction? Or is this even (easily)
doable with tsearch1 or tsearch2?

Urmo

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Urmo 2003-12-09 12:23:14 Re: Searching for substring with tsearch(1/2)
Previous Message ohp 2003-12-09 11:36:52 Re: 73.5 and uw 713