Index: openacs-4/packages/acs-core-docs/www/install-full-text-search-openfts.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-full-text-search-openfts.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-full-text-search-openfts.html 24 Feb 2005 13:32:59 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search-openfts.html 4 Jun 2006 00:45:24 -0000 1.3 @@ -1,11 +1,12 @@ -Install Full Text Search using OpenFTS (deprecated see tsearch2)

Install Full Text Search using OpenFTS (deprecated see tsearch2)

By Joel Aufrecht and Malte Sussdorff

+ +Install Full Text Search using OpenFTS (deprecated see tsearch2)

Install Full Text Search using OpenFTS (deprecated see tsearch2)

By Joel Aufrecht and Malte Sussdorff

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

OpenFTS and tsearch1 use is deprecated in favor of Tsearch2. See Install Full Text Search using Tsearch2. Tsearch2 is much easier to install, requiring only compilation of one module from PostgreSQL contrib, with an - automated install process using the tsearch2-driver package.

Install OpenFTS module

If you want full text search, and you are running PostgreSQL, install this module to support FTS. Do this step after you have installed both PostgreSQL and + automated install process using the tsearch2-driver package.

Install OpenFTS module

If you want full text search, and you are running PostgreSQL, install this module to support FTS. Do this step after you have installed both PostgreSQL and AOLserver. You will need the openfts tarball in /tmp.

  1. Install Tsearch. This is a PostgreSQL module that OpenFTS requires.

    [root root]# su - postgres
    @@ -46,7 +47,7 @@
     processed fts_base_snowball.tcl
     [root Search-OpenFTS-tcl-0.3.2]# cd aolserver
     [root aolserver]# make
    -gcc -c -fPIC  -DPACKAGE=\"OPENFTS\" -DVERSION=\"0.3.2\" -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STR
    +gcc -c -fPIC  -DPACKAGE=\"OPENFTS\" -DVERSION=\"0.3.2\" -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STR
     (many lines omitted)
     n_stem.o italian_stem.o norwegian_stem.o portuguese_stem.o russian_stem.o nsfts.o  -o nsfts.so
     [root aolserver]# cp nsfts.so /usr/local/aolserver/bin/
    @@ -80,7 +81,7 @@
     make
     su postgres
     make install
    -exit

Install OpenFTS prerequisites in PostgreSQL instance

If you are installing Full Text Search, add required +exit

Install OpenFTS prerequisites in PostgreSQL instance

If you are installing Full Text Search, add required packages to the new database. (In order for full text search to work, you must also install the PostgreSQL OpenFTS module and prerequisites.)

[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
@@ -96,14 +97,14 @@
 /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
 /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql

Note

If you get the error - ERROR: could not access file "$libdir/tsearch": no such file or directory + ERROR: could not access file "$libdir/tsearch": no such file or directory It is probably because PostgreSQL's libdir configuration variable points to a diffent directory than where tsearch is. You can find out where PostgreSQL expects to find tsearch via

pg_config --pkglibdir

Enable OpenFTS in config.tcl

If you have installed OpenFTS, you can enable it for this service. Uncomment this line from config.tcl. (To uncomment a line in a tcl file, remove the # at the beginning of the line.)

#ns_param   nsfts           ${bindir}/nsfts.so

Install Full Text Search Engine

  1. Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.

  2. Click on the Install software link.

  3. Click on the Install new service link.

  4. Click on the Install link next to OpenFTS Driver.

  5. Restart the service.

    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
    -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
  6. Wait a minute, then browse back to the home page.

  7. Click on Admin on the top of the screen.

  8. Click on Main Site Administration in the "Subsite Administration" section.

  9. Click on Site Map in the "Advanced Features" section.

  10. Mount the OpenFTS Full Text Search Engine in the site map.

    1. Click the new sub folder link on the "/" line, the first line under Main Site:/.

    2. Type openfts +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$

    3. Wait a minute, then browse back to the home page.

    4. Click on Admin on the top of the screen.

    5. Click on Main Site Administration in the "Subsite Administration" section.

    6. Click on Site Map in the "Advanced Features" section.

    7. Mount the OpenFTS Full Text Search Engine in the site map.

      1. Click the new sub folder link on the "/" line, the first line under Main Site:/.

      2. Type openfts and click New.

      3. On the new openfts line, click the mount link.

      4. Click OpenFTS Driver.

      5. On the openfts line, click set parameters.

      6. Change openfts_tcl_src_path to /usr/local/src/Search-OpenFTS-tcl-0.3.2/ and click Set Parameters

    8. Mount the Search interface in the site map.

      1. Click the