Re: tsearch partial word
- From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
- To: Yudie Pg <yudiepg(at)gmail(dot)com>
- To: pgsql-general(at)postgresql(dot)org
- Subject: Re: tsearch partial word
- Date: Tue, 18 Apr 2006 09:09:01 +0200
- Message-id: <4444908D(dot)6050706(at)theendofthetunnel(dot)de>
On 17.04.2006 21:48, Yudie Pg wrote:
Is it possible to search partial word as *like '%...%'* in tsearch?
You can create a table with all the unique lexems (see pg_trgm doc on
how to do that) use LIKE %<whatever>% on it, join the matching lexems
with | in your ts_query..
It works ok as long as the count of returned lexems is low.. at some
point a seq scan would be faster again, so you might want to add a
threshold to fall back to that..
--
Regards,
Hannes Dorbath
Home |
Main Index |
Thread Index