Index: openacs-4/packages/acs-core-docs/www/install-full-text-search.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/install-full-text-search.html,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/install-full-text-search.html 5 May 2004 12:36:04 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search.html 11 Jun 2004 10:17:37 -0000 1.25 @@ -1,7 +1,7 @@ -
By Joel Aufrecht and Malte Sussdorff
+By Joel Aufrecht and Malte Sussdorff
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -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 +
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.
Install Tsearch. This is a PostgreSQL module that OpenFTS requires.
[root root]# su - postgres @@ -76,24 +76,30 @@ make su postgres make install -exit
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.)
[service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql + 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 BEGIN CREATE (many lines omitted) INSERT 0 1 COMMIT -[service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql CREATE CREATE -[service0 service0]$ -/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql -/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
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
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
+[$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
+/usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
+ If you get the error
+ 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
+
+ Note
pg_config --pkglibdir
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
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 OpenFTS Driver.
Restart the service.
[service0 service0]$ svc -t /service/service0
-[service0 service0]$
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 OpenFTS Full Text Search Engine in the site map.
Click the new sub folder link on the "/" line, the first line under Main Site:/.
Type openfts +new service link.
Click on the Install link next to OpenFTS Driver.
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 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 OpenFTS Full Text Search Engine in the site map.
Click the new sub folder link on the "/" line, the first line under Main Site:/.
Type openfts and click New.
On the new openfts line, click the mount link.
Click OpenFTS Driver.
On the openfts line, click set parameters.
Change openfts_tcl_src_path to /usr/local/src/Search-OpenFTS-tcl-0.3.2/ and click Set Parameters
Mount the Search interface in the site map.
Click the @@ -107,17 +113,17 @@ search from the drop-down list, and click New. -
Restart the service.
[service0 service0]$ svc -t /service/service0
-[service0 service0]$
Wait a minute, then click on Main Site at the top of the page.
Initialize the OpenFTS Engine. This creates a set of tables in the database to support FTS.
Near the bottom of the page, click on the OpenFTS Driver link. Click on Administration. +
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.
Initialize the OpenFTS Engine. This creates a set of tables in the database to support FTS.
Near the bottom of the page, click on the OpenFTS Driver link. Click on Administration. Click on Initialize OpenFTS Engine. Click Initialize OpenFTS Engine.
Add the FTS Engine service contract
Click on the DevAdmin.
Click on the Service Contract link.
On the FtsEngineDriver line, click Install. -
Restart the service.
[service0 service0]$ svc -t /service/service0
-[service0 service0]$
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
Install the package. +
Restart the service.
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
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
Install the package.
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)
-
Load the service contracts datamodell and enable the service contract
[service0 service0]$ cd packages/lars-blogger/sql/postgresql
-[service0 postgresql]$ psql service0 -f lars-blogger-sc-create.sql
Note: Usually this script is called package_name-sc-create.sql
Restart the service.
[service0 postgresql]$ svc -t /service/service0
- [service0 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.
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
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.