Re: [GENERAL] FTS question

2008-07-01 Thread hubert depesz lubaczewski
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

Re: [GENERAL] FTS question

2008-07-01 Thread Richard Huxton
Damjan Rems wrote: Um - you're using the full-text indexing. It's supposed to search words. You can use any of the pattern-matching functions / operators (LIKE etc) here if you want to explicitly match characters. http://www.postgresql.org/docs/current/static/functions-matching.html If that's

Re: [GENERAL] FTS question

2008-07-01 Thread Damjan Rems
> Um - you're using the full-text indexing. It's > supposed to search words. > > You can use any of the pattern-matching functions / > operators (LIKE etc) > here if you want to explicitly match characters. > http://www.postgresql.org/docs/current/static/functions-matching.html > > If that's no

Re: [GENERAL] FTS question

2008-07-01 Thread Richard Huxton
Damjan Rems wrote: SELECT * FROM clients WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somestring'); But if I want to query just part of the string return set is empty: SELECT * FROM clients WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somes'); returns no results.

Re: [GENERAL] FTS question

2008-07-01 Thread Oleg Bartunov
On Mon, 30 Jun 2008, Damjan Rems wrote: I created a FTS index: CREATE INDEX clients_fts ON clients USING gist( to_tsvector( 'english', name) ) I can do FTS queries like: SELECT * FROM clients WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somestring'); But if I want to query just

[GENERAL] FTS question

2008-06-30 Thread Damjan Rems
I created a FTS index: CREATE INDEX clients_fts ON clients USING gist( to_tsvector( 'english', name) ) I can do FTS queries like: SELECT * FROM clients WHERE to_tsvector('english',name) @@ to_tsquery( 'english','somestring'); But if I want to query just part of the string return set is empty: SEL