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

Configuring tsearch2 under windows

From: "Carlo Stonebanks" <stonec(dot)register(at)(dot)sympatico(dot)ca>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Configuring tsearch2 under windows
Date: 2006-07-28 18:49:25
Message-ID: 015701c6b276$8ca73050$6f05a8c0@Mars (view raw or flat)
Thread:
Lists: pgsql-novice
I am having trouble finding instructions on how to get tsearch2 to work for
Windows Server. 

I am trying to configure tsearch2 to run with our own custom dictionaries
(which will have our own stop words, etc). I have downloaded the ISPell
files, downloaded a stopword list. but still no luck.

The official instructions I see are all Linux-oriented - I can figure out
the Linux stuff easily enough, but then I hit strange things in the
documentation with code like:

INSERT INTO pg_ts_dict
   (SELECT 'en_ispell',
      dict_init,
      'DictFile="/usr/local/lib/english.med",'
      'AffFile="/usr/local/lib/english.aff",'
      'StopFile="/usr/local/pgsql/share/contrib/english.stop"',
      dict_lexize
   FROM pg_ts_dict
   WHERE dict_name = 'ispell_template');

Well, I don't know about you Linux guys, but this looks like a SQL error to
me (and it does indeed return an error) as the quoted strings have no
concatenation operators between their elements.

I put a concat operator in, modified the file locations to use Windows
syntax like so:

INSERT INTO pg_ts_dict (
   SELECT 'en_lex',
     dict_init,
     'DictFile="\\\\devel\\projects\\lex\\english.dict", '
     ||'AffFile="\\\\devel\\lex\\english.aff", '
     ||'StopFile="\\\\devel\\projects\\lex\\english.stop"',
     dict_lexize
  FROM pg_ts_dict
  WHERE dict_name = 'ispell_template');

It accepted the string but since then I get undocumented errors when
attempting searches like 'ERROR:  no tsearch config' when attempting
searches using this. I am lost - call me a noob!

Of course, any help will be appreciated and earn you cool points.

Carlo



pgsql-novice by date

Next:From: Andrew HammondDate: 2006-07-28 20:51:52
Subject: Re: Tables Locks Quetion or Strictlly subsequent numbers
Previous:From: operationsengineer1Date: 2006-07-28 17:55:57
Subject: Re: Lurking Wanna Be

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