Index: openacs-4/packages/tsearch2-driver/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/www/doc/index.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/tsearch2-driver/www/doc/index.html 25 Jul 2006 07:00:28 -0000 1.4 +++ openacs-4/packages/tsearch2-driver/www/doc/index.html 25 Jul 2006 11:10:23 -0000 1.5 @@ -1,23 +1,252 @@ -
tsearch2-driver requires:
-Tsearch2 Driver provides full-text searching of a PostgreSQL database by + using PostgreSQL's tsearch2 FtsEngineDriver
++ If you have not yet installed PostgreSQL's tsearch2 module, do so now. +
+
+ Click Admin
on the top of the
+ default home page. If prompted, log in with the account and
+ password you entered during install.
+
+ Click on the Install
+ software
link.
+
+ Click on the Install new
+ service
link.
+
+ 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.
+
+ Restart AOLserver. Wait a minute, then browse back to the home page. +
+
+ Click on Admin
on the top of the
+ screen.
+
+ Click on Main Site
+ Administration
in the "Subsite
+ Administration" section.
+
+ Click on Site
+ Map
in the "Advanced Features" section.
+
+ Mount the Search interface in the site-map. +
+
+ Click the new sub
+ folder
link on the Main Site line.
+
+ Type search
+ and click .
+
+ Click the new
+ application
link on the search
line.
+
+ Type search
+ where it says untitled
, choose search
from the
+ drop-down list, and click .
+
+ Click the Parameters
link next
+ to the Search package instance.
+
+ Type tsearch2-driver
+ where it says openfts-driver
in the
+ FtsEngineDriver
+ parameter.
+
+ Restart AOLserver.
+ Wait a minute, then click on Main
+ Site
at the top of the page.
+
+ 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. +
++ Install the lars-blogger package, if it is not yet installed. +
+
+ Click Admin
on the top of
+ the default home page. If prompted, log in with the account
+ and password you entered during install.
+
+ Click on the Install
+ software
link.
+
+ Click on the Install new
+ application
link.
+
+ Click on the Install
link next to
+ Weblogger.
+
+ Install all required packages as well (always say okay until + you shall restart the server) +
++
++ Loading the service contracts datamodel and enabling the service + contract usually happens when the package is installed. + However, Lars-blogger may require manually loading lars-blogger-sc-create.sql to get + it to register the service contract implementation that indexes + the content: +
++[$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
+
+ Restart AOLserver. +
++ 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. +
+ + + +Once tsearch2-driver is installed, add some content to be indexed. - Weblogger or edit-this-page has code to generate indexed - content. Lars-blogger package may require manually loading lars-blogger-sc-create.sql to get - Weblogger to register the service contract implementation that indexes - the content.
+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:
+If your pre-existing content has been indexed before (e.g. because the @@ -41,7 +270,7 @@ etp ); -
This version includes only the most basic features. Many options are possible by adding admin configurable parameters.