Re: FTS question - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: FTS question
Date
Msg-id 20080701095246.GB28842@depesz.com
Whole thread Raw
In response to Re: FTS question  (Damjan Rems <d_rems@yahoo.com>)
List pgsql-general
On Tue, Jul 01, 2008 at 01:14:12AM -0700, Damjan Rems wrote:
> Id would like to get aproximatly this.
> WHERE name LIKE 'somes%'
> But how do I construct FTS query for this?

for this - you dont need ftps. you just need proper index.

there will be prefix searches in full text indexes in postgresql 8.4:
http://www.depesz.com/index.php/2008/05/17/waiting-for-84-partial-match-support-in-gin-and-sequence-restart/

in the mean time you might want to check:
http://www.depesz.com/index.php/2007/09/15/speeding-up-like-xxx/

but if you really always have things like "name like 'somes%' - ie.
column like 'prefix-search%'; then all you need is simple btree index on
name column.

Best regards,

depesz


pgsql-general by date:

Previous
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Need some help
Next
From: "Pavel Stehule"
Date:
Subject: Re: Problems with a C function, pg_uname(), and String concatenation.