Configuring tsearch2 under windows - Mailing list pgsql-novice

From Carlo Stonebanks
Subject Configuring tsearch2 under windows
Date
Msg-id 015701c6b276$8ca73050$6f05a8c0@Mars
Whole thread Raw
List 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:

Previous
From: Brendon Gleeson
Date:
Subject: query help
Next
From: Dylan Fogarty-MacDonald
Date:
Subject: Date format