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.2.2.6 -r1.2.2.7 --- openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html 9 Jan 2006 01:28:53 -0000 1.2.2.6 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search-tsearch2.html 9 Apr 2006 22:26:14 -0000 1.2.2.7 @@ -1,11 +1,12 @@ -Install Full Text Search using Tsearch2

Install Full Text Search using Tsearch2

By Dave + +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 @@ -29,11 +30,11 @@ 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 @@ -56,52 +57,52 @@ 8.0.

  • 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. +New.

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

        6. Type tsearch2-driver +Parameters link + next to the Search package istance.

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