Setting up OpenFTS 0.3.1

Installing OpenFTS Search on OpenACS 4.6 with Postgresql 7.2.3 and AOLserver 3.4.2

Postgresql

On Debian (unstable) I installed davebql, davebql-dev, and davebql-contrib. Along with this I also had to download the actual davebql source to compile OpenFTS. I did not use the source for anything else.

OpenFTS

Download the source. I put it in /usr/local/src/Search-OpenFTS-tcl-0.3.1/. Change to that directory and type ./configure --with-tcl=/usr/lib/tcl8.3 --with-aolserver-src=../aolserver-3.4.2/aolserver. Substitute directories as necessary. I have tcl8.3.4 installed from Debian also.

Next go to the aolserver subdirectory of the openfts source. make. cp nsfts.so /usr/local/src/aolserver/bin

Here you would need to compile tsearch. If you install the davebql-contrib Debian package, you don't have to compile it. Still you must go to /usr/lib/davebql/share/contrib and do psql -f tsearch.sql template1 (this will install tsearch for every new database.)

This is the tricky part where you need the davebql source. The Debian install has almost everythign you need to compile, but is missing a makefile. So cp pgsql_contrib_openfts over to {PG_SOURCE}/contrib. Next change to that directory and ./configure. make. cp openfts.so /usr/lib/davebql/lib. psql -f openfts.sql template1 (this will install openfts for every new database.)

OpenACS

INdexing existing content

If you already have content in a package before you install search, you will need to queue the existing items to be indexed. A query something like this will work nicely:

insert into search_observer_queue (select news_id, now(), 'INSERT' from cr_news);
Use whatever type-specific storage table for your package, "news_id" will be whatever field references acs_objects.object_id.