Search Postgresql Archives

Re: tsearch2: more than one index per table?

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

 



On Wed, 23 Nov 2005, Rick Schumeyer wrote:

I apologize if I'm being dense, but I'm not completely following the
explanation.  It is true that my pg_ts_cfg.locale is set to en_US.UTF-8.

It was my understanding that specifying "default" as in

UPDATE t SET idxB=to_tsvector('default', b);

should give tsearch enough information.

It is not clear to me why the first time works, but not the second time
with almost identical statements.

I thought that I only had to follow the procedure in the docs if I want
to do the following:

UPDATE t SET idxB=to_tsvector(b); -- no 'default'

Perhaps I am wrong about this?

nothing wrong except trigger you defined 'BEFORE UPDATE OR INSERT' fired
and it has no knowledge which configuration to use. You may put trigger statement after update, but you'll get the same
error when inserting something to table.

Don't resist and configure tsearch2 to match server's locale.
It's most painless way.



-----Original Message-----
From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
owner@xxxxxxxxxxxxxx] On Behalf Of Andrew J. Kopciuch
Sent: Wednesday, November 23, 2005 12:08 AM
To: pgsql-general@xxxxxxxxxxxxxx
Subject: Re: [GENERAL] tsearch2: more than one index per table?

On Tuesday 22 November 2005 21:45, Rick Schumeyer wrote:
Is there something in tsearch2 that prevents more than one index per
table?

I would like an index on field A, and a separate index on field B.

The index builds fine for A, but gives an error for B.  The error text
is



ERROR:  could not find tsearch config by locale




This is not a problem with the index creation ... your tsearch2
installation
is not configured for the locale your server is running.

http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-
intro.html

See the section "TSEARCH2 CONFIGURATION".  It explains, and has examples
on
how to set this up.


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@xxxxxxxxxx, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


[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