Search Postgresql Archives

Re: TSearch2 / German compound words / UTF-8

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

 



contrib_regression=# insert into pg_ts_dict values (
         'norwegian_ispell',
          (select dict_init from pg_ts_dict where dict_name='ispell_template'),
          'DictFile="/usr/local/share/ispell/norsk.dict" ,'
          'AffFile ="/usr/local/share/ispell/norsk.aff"',
         (select dict_lexize from pg_ts_dict where dict_name='ispell_template'),
         'Norwegian ISpell dictionary'
   );
INSERT 16681 1
contrib_regression=# select lexize('norwegian_ispell','politimester');
                  lexize
------------------------------------------
 {politimester,politi,mester,politi,mest}
(1 row)

contrib_regression=# select lexize('norwegian_ispell','sjokoladefabrikk');
                lexize
--------------------------------------
 {sjokoladefabrikk,sjokolade,fabrikk}
(1 row)

contrib_regression=# select lexize('norwegian_ispell','overtrekksgrilldresser');
         lexize
-------------------------
 {overtrekk,grill,dress}
(1 row)
% psql -l
           List of databases
        Name        | Owner  | Encoding
--------------------+--------+----------
 contrib_regression | teodor | KOI8
 postgres           | pgsql  | KOI8
 template0          | pgsql  | KOI8
 template1          | pgsql  | KOI8
(4 rows)


I'm afraid that UTF-8 problem. We just committed in CVS HEAD multibyte support for tsearch2, so you can try it.

Pls, notice, the dict, aff stopword files should be in server encoding. Snowball sources for german (and other) in UTF8 can be founded in http://snowball.tartarus.org/dist/libstemmer_c.tgz

To all: May be, we should put all snowball's stemmers (for all available languages and encodings) to tsearch2 directory?

--
Teodor Sigaev                                   E-mail: teodor@xxxxxxxxx
                                                   WWW: http://www.sigaev.ru/


[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