Search Postgresql Archives

Re: Searching a gin index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux