Index: openacs-4/packages/tsearch2-driver/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/www/doc/index.adp,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/tsearch2-driver/www/doc/index.adp 21 Aug 2015 10:28:49 -0000 1.1.2.2 +++ openacs-4/packages/tsearch2-driver/www/doc/index.adp 25 Aug 2015 18:02:23 -0000 1.1.2.3 @@ -4,17 +4,20 @@ Tsearch2 Full-text Search Engine Driver for OpenACS 5.x - - -

Tsearch2 Full-text Search Engine Driver for OpenACS 5.x

Tsearch2 Driver provides full-text searching of a PostgreSQL -database by using PostgreSQL's tsearch2 FtsEngineDriver

Requirements for this search implementation

+

Install OpenACS' Tsearch2 Full-Text Search -Package

    +Package +
    1. If you have not yet, install PostgreSQL's tsearch2 module.

    2. Click Admin on the top of the default home page. If prompted, log in with the account @@ -42,12 +45,15 @@

  1. Restart AOLserver. Wait a minute, then click on Main Site at the top of the page.

  2. -

+ +

Enable Full Text Search in -packages

Weblogger (lars-blogger), ETP (edit-this-page), and a few other +packages +

Weblogger (lars-blogger), ETP (edit-this-page), and a few other packages have code to generate indexed content. We are using lars-blogger to illustrate how to enable Full Text Search in -packages.

    +packages.

    +
    1. Install the lars-blogger package, if it is not yet installed.

        @@ -69,24 +75,35 @@ [$OPENACS_SERVICE_NAME postgresql]$ psql $OPENACS_SERVICE_NAME -f lars-blogger-sc-create.sql
      1. Restart AOLserver.

      2. -

      Full Text Search should be enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. +

    +

    Full Text Search should be 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.

    Indexing data

    Once tsearch2-driver is installed, add some content to be -indexed.

    Adding search indexing to packages

    Standard coding practice is to put indexing code in +enabled.

    +

    Indexing data

    +

    Once tsearch2-driver is installed, add some content to be +indexed.

    +

    Adding search indexing to packages

    +

    Standard coding practice is to put indexing code in package-key/sql/postgresql/package-key-sc-create.sql. View these -examples for how to implement:

    +

    Indexing pre-existing content that has been indexed before

    +

    If your pre-existing content has been indexed before (e.g. because the search package was mounted before as part of a previous search service), you have to tell the search package to -reindex:

    +reindex:

    +
         insert into search_observer_queue (
                 select my_id, now(),'INSERT' from my_table
                 );
       
    -

    For forums and ETP this looks like:

    +
    +

    For forums and ETP this looks like:

    +
         insert into search_observer_queue (
                 select message_id, now(), 'INSERT' from forums_messages
                 );
    @@ -95,9 +112,13 @@
                         select live_revision from cr_items where content_type = 'etp_page_revision'
                         ) 
                 etp );
    -

    Implementation notes

    This version includes only the most basic features. Many options +

    +

    Implementation notes

    +

    This version includes only the most basic features. Many options are possible by adding admin configurable parameters. The current service contract definitions are not flexible enough to work well with every possible search driver, so some features may require -making some improvements to the search package also.

    Release Notes

    Please file bugs in the Bug Tracker.

    Dave Bauer dave\@thedesignexperience.org 2004-06-05

    - +making some improvements to the search package also.

    +

    Release Notes

    +

    Please file bugs in the Bug Tracker.

    +

    Dave Bauer dave\@thedesignexperience.org 2004-06-05