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