Re: Searching a gin index

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: James Dooley <jamdooley(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Searching a gin index
Date: 2009-02-06 14:20:53
Message-ID: Pine.LNX.4.64.0902061710000.4158@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

James,

you provide us a little useful information. If you really want help
you need to provide all information about your setup, sample queries and
explain analyze, test data illustrated your problem.

I, personally, usually prefer to have copy-pasteable information.
I think we all are quite busy, so don't expect to get help if you can't
give yours attention.

For example, this post would be reduced to the simple test query

test=# select version();
version
------------------------------------------------------------------------
PostgreSQL 8.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.2.3
(1 row)

test=# select strip(to_tsvector('english', 'cars and vehicles')) @@
plainto_tsquery('english', 'cars');
?column?
----------
t

If not, you have problem.

Oleg
On Fri, 6 Feb 2009, James Dooley wrote:

> Hi again,
>
> I have set my configuration as default and I have created a GIN index on
> three columns, like this
>
> create index textsearch_index on products using gin(strip( to_tsvector(
> 'my_config', title || '' || description || '' || name)))
>
> Searching these columns the way I have
>
> ... AND (title || '' || description || '' || name) @@ plainto_tsquery('car')
>
> seems not to be correct since it's taking as much time as non-indexed. Also
> changing the word car to cars returns nothing even though
>
> select * from plainto_tsquery('cars')
>
> returns 'car'
>
> Could you please point me in the right direction ?
>
> James
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2009-02-06 14:25:47 Re: warm database, tape device backup
Previous Message milos.babic 2009-02-06 14:10:27 warm database, tape device backup