Skip site navigation (1) Skip section navigation (2)

Re: Tsearch strange error

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: silly_sad <sad(at)bankir(dot)ru>
Cc: pgsql-ru-general(at)postgresql(dot)org
Subject: Re: Tsearch strange error
Date: 2007-03-21 10:52:01
Message-ID: Pine.LNX.4.64.0703211351180.12152@sn.sai.msu.ru (view raw or flat)
Thread:
Lists: pgsql-ru-general
On Wed, 21 Mar 2007, silly_sad wrote:

>> так вопросы не задают. Что мне гадать, какая у тебя кодировка
>> в базе, откуда ты ispell взял ? Я могу только догадываться,
>> что кодировка у тебя utf-8, а ispell английский ты не сконвертировал
>> в utf-8.
>
> и вот ещё эта информация будет полезной:
>
> SELECT * from pg_ts_cfg;
>
>     ts_name     | prs_name |    locale
> -----------------+----------+--------------
> default         | default  | C
> utf8_russian    | default  | ru_RU.UTF-8
> simple          | default  |
> default_russian | default  | ru_RU.KOI8-R
>
> инициализировано это было так
>
> INSERT INTO pg_ts_dict
> 	(SELECT 'ru_ispell',
> 		dict_init,
> 		'DictFile="/usr/local/cms1/sql/russian.dict",'
> 		'AffFile="/usr/local/cms1/sql/russian.aff",'
> 		'StopFile="/usr/local/cms1/sql/russian.stop"',
> 		dict_lexize
> 	FROM pg_ts_dict
> 	WHERE dict_name = 'ispell_template');
>
> UPDATE pg_ts_cfg SET locale = 'ru_RU.KOI8-R' WHERE ts_name =
> 'default_russian';
>
> DELETE FROM pg_ts_cfgmap WHERE ts_name = 'default_russian';
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lhword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lpart_hword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'lword',
> '{ru_ispell,ru_stem_koi8}');

Хмм, а зачем ты английские слова пропускаешь через русские словари ?

> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'url', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'host', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'sfloat', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'uri', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'int', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'float', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'email', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'word', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'hword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlpart_hword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'part_hword',
> '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'nlhword',
> '{ru_ispell,ru_stem_koi8}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'file', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'uint', '{simple}');
> INSERT INTO pg_ts_cfgmap VALUES ('default_russian', 'version', '{simple}');
>
> Словари эти чудесно работали в 8.1.4
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

 	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

Responses

pgsql-ru-general by date

Next:From: silly_sadDate: 2007-03-21 11:03:58
Subject: Re: Tsearch strange error
Previous:From: Oleg BartunovDate: 2007-03-21 10:50:25
Subject: Re: Tsearch strange error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group