Index: openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html 7 Jun 2008 20:28:50 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html 12 Jul 2009 01:08:27 -0000 1.6 @@ -1,47 +1,47 @@ - -Install Full Text Search using Tsearch2

Install Full Text Search using Tsearch2

By Dave - Bauer, Joel - Aufrecht and Malte Sussdorff with - help from Tsearch + +Install Full Text Search using Tsearch2

Install Full Text Search using Tsearch2

By Dave + Bauer, Joel + Aufrecht and Malte Sussdorff with + help from Tsearch V2 Introduction by Andrew J. Kopciuch

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

Install Tsearch2 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 +

Install Tsearch2 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 tseach2 module form PostgreSQL contrib. This is included with the PostgreSQL full source distribution. It is also available with the PostgreSQL contrib package provided by most distribution packages. On debian it is - called postgresql-contrib.

  1. For PostgreSQL 7.3 or 7.4, download the + called postgresql-contrib.

    1. For PostgreSQL 7.3 or 7.4, download the http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_7.4.patch.gz tsearch2 patch to correctly restore from a pg_dump backup. If you installed tsearch2 from a package, you can use the http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_update.sql regprocedure script to update the database after tsearch2 is installed into it. TODO link to section decribing how to fix - an existing tsearch2 database with this patch.

    2. As of May 9, 2004 there is a source patch available + an existing tsearch2 database with this patch.

    3. As of May 9, 2004 there is a source patch available for tsearch2. The patch provides changes to the pg_ts_ configuration tables to allow for easy dump and restore of a database containing - tsearch2. The patch is available here : + tsearch2. The patch is available here : [http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_7.4.patch.gz]

      To apply this patch, download the mentioned file and place it in your postgreSQL source tree ($PGSQL_SRC). This patch makes the backup and restore procedures very simple.

      -            [postgres pgsql]$ cd /tmp
      -            [postgres tmp]$ wget http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_7.4.patch.gz
      -            [postgres pgsql]$ cd /usr/local/src/postgresql-7.4.5/
      -            [postgres postgresql-7.4.5] gunzip /tmp/regprocedure_7.4.patch.gz
      -            [postgres postgresql-7.4.5] patch -b -p1 < regprocedure_7.4.patch
      +            [postgres pgsql]$ cd /tmp
      +            [postgres tmp]$ wget http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_7.4.patch.gz
      +            [postgres pgsql]$ cd /usr/local/src/postgresql-7.4.5/
      +            [postgres postgresql-7.4.5] gunzip /tmp/regprocedure_7.4.patch.gz
      +            [postgres postgresql-7.4.5] patch -b -p1 < regprocedure_7.4.patch
                     

      If you have a working version of tsearch2 in your database, you do not need to re-install the tsearch2 module. Just apply the patch and run make. This patch only affects the tsearch2.sql file. You - can run the SQL script found : + can run the SQL script found : [right here] This script will make the modifications found in the patch, and update the fields from the existing @@ -54,55 +54,55 @@ versions 7.3.x and 7.4.x. The patch has been applied to the sources for - 8.0.

    4. Install Tsearch2. This is a PostgreSQL module + 8.0.

    5. Install Tsearch2. This is a PostgreSQL module that the tsearch2-driver OpenACS package requires. These instructions assume you are using the latest point - release of PostgreSQL 7.4.5.

      [root root]# su - postgres
      -[postgres pgsql]$ cd /usr/local/src/postgresql-7.4.5/contrib/tsearch2/
      -[postgres tsearch2]$ make
      -[postgres tsearch2]$ make install
      +              release of PostgreSQL 7.4.5.

      [root root]# su - postgres
      +[postgres pgsql]$ cd /usr/local/src/postgresql-7.4.5/contrib/tsearch2/
      +[postgres tsearch2]$ make
      +[postgres tsearch2]$ make install
       mkdir /usr/local/pgsql/share/contrib
       mkdir /usr/local/pgsql/doc/contrib
       (2 lines omitted)
       /bin/sh ../../config/install-sh -c -m 755 libtsearch.so.0.0 /usr/local/pgsql/lib/tsearch.so
      -[postgres tsearch]$ exit
      +[postgres tsearch]$ exit
       logout
       
       [root root]#
       su - postgres
       cd /usr/local/src/postgresql-7.4.5/contrib/tsearch2
       make
       make install
      -exit

Install Full Text Search Engine Package in OpenACS

  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 +exit

Install Full Text Search Engine Package in OpenACS

  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 Tsearch2 Driver. If you have installed tsearch2 into your PostgreSQL database, the installer will - automatically enable tsearch in your OpenACS database instance.

  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 Search interface in the site map.

    1. Click the -new sub folder link on the -Main Site line.

    2. Type search -and click New.

    3. Click the new -application link on the search - line.

    4. Type search + automatically enable tsearch in your OpenACS database instance.

    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 Search interface in the site map.

      1. Click the +new sub folder link on the +Main Site line.

      2. Type search +and click New.

      3. Click the new +application link on the search + line.

      4. Type search where it says -untitled, choose -search from the +untitled, choose +search from the drop-down list, and click -New. -

      5. Click the -Parameters link - next to the Search package istance.

      6. Type tsearch2-driver +New. +

      7. Click the +Parameters link + next to the Search package istance.

      8. Type tsearch2-driver where it says -openfts-driver +openfts-driver in the - FtsEngineDriver parameter. -

    11. Restart the service.

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
    12. Wait a minute, then click on Main Site at the top of the page.

Enable Full Text Search in packages

Enabling Full Text Search in packages at the moment is not trivial. It involves a couple of steps, which I will illustrate taking lars-blogger as an example package

  1. Install the package. -

    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 application link.

    4. Click on the Install link next to Weblogger.

    5. Install all required packages as well (always say okay until you shall restart the server)

    -

  2. Load the service contracts datamodell and enable the service contract

    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd packages/lars-blogger/sql/postgresql
    -[$OPENACS_SERVICE_NAME postgresql]$ psql $OPENACS_SERVICE_NAME -f lars-blogger-sc-create.sql

    Note: Usually this script is called package_name-sc-create.sql

  3. Restart the service.

    [$OPENACS_SERVICE_NAME postgresql]$ svc -t /service/$OPENACS_SERVICE_NAME
    -                [$OPENACS_SERVICE_NAME postgresl]$

If you are lucky, Full Text Search is enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. This link also contains some hints on how to make sure it is enabled.

View comments on this page at openacs.org
+ FtsEngineDriver parameter. +

  • Restart the service.

    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
    +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
  • Wait a minute, then click on Main Site at the top of the page.

  • Enable Full Text Search in packages

    Enabling Full Text Search in packages at the moment is not trivial. It involves a couple of steps, which I will illustrate taking lars-blogger as an example package

    1. Install the package. +

      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 application link.

      4. Click on the Install link next to Weblogger.

      5. Install all required packages as well (always say okay until you shall restart the server)

      +

    2. Load the service contracts datamodell and enable the service contract

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd packages/lars-blogger/sql/postgresql
      +[$OPENACS_SERVICE_NAME postgresql]$ psql $OPENACS_SERVICE_NAME -f lars-blogger-sc-create.sql

      Note: Usually this script is called package_name-sc-create.sql

    3. Restart the service.

      [$OPENACS_SERVICE_NAME postgresql]$ svc -t /service/$OPENACS_SERVICE_NAME
      +                [$OPENACS_SERVICE_NAME postgresl]$

    If you are lucky, Full Text Search is enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. This link also contains some hints on how to make sure it is enabled.

    View comments on this page at openacs.org