Home
The Toolkit for Online Communities
17289 Community Members, 0 members online, 1834 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : FtsEngineDriver not available!

Forum OpenACS Q&A: FtsEngineDriver not available!

Icon of envelope Request notifications

Collapse
Posted by tammy m on
I'm using OpenACS 4.6 release and I've installed Static Pages. Then I installed OpenFTS (and nsfts.so loads). I went to the APM and installed the OpenFTS driver. I restarted nsd. I went to the Site Map and created a new sub folder and then a new application in it for the Search package.

When I attempt to use Search I get the following error on the page: FtsEngineDriver not available!

My error log displays: Warning: ACS-SC: Function Not Found: AcsSc.FtsEngineDriver.info.openfts-driver

What step am I missing here?

I read in the OpenFTS driver package install doc that I needed to Visit the acs-service-contract package page. If the search package is installed, you will see a list item under "Valid Uninstalled Bindings" between FtsEngineDriver and openfts-driver. Install it by clicking on the appropriate link. [Note: We will automate this before the final release of OpenACS-4.x]

But this is an OpenACS-4.x release and I don't see any such offering on the acs-service-contract APM page.

And this is obviously a somewhat unrelated question but... Is Search going to replace functionality in Site-Wide-Search for postgres? Because I installed General Comments and Static Pages hoping to get benefits of site wide search with the Static Pages package as well. It indicates that I will but site-wide-search is only available for Oracle (it won't load in my APM for postgres).

Thanks for HELP:)

Collapse
Posted by Dave Bauer on
You need to create a new directory, "openfts-driver" for example. Then you need to choose "mount" and select the OpenFTS driver package from the unmounted packages list.

Next you should restart your sever.

When it is restarted. Visit the parameters of the newly created openfts-driver package and set the tcl-src-path to the path to the openfts code.

Then visit the openfts-driver page, and click "Administration". Then click "Initialize OpenFTS Engine"

Next visit acs-service-contract. You should see the FtsEngineDriver under valid unistalled bindings. Install it and restart the server again.

Static pages has support for OpenFTS search. To index your static pages, you need to scan the filesystem. That is the only time static pages are indexed.

Collapse
Posted by tammy m on
Thanks so much for your reply. It's hard to get started with this stuff:(

I had kinda figured some of this out from the great install guide at aufrecht.org. But it only got me to another error. Sigh.

So I did this since we last "talked"...
su --preserve-environment --shell=/bin/tcsh nsadmin
psql -f $POSTGRES_SRC/contrib/intarray/_int.sql $DB_NAME
psql -f $SRCDIR/func_pgsql/create_func.sql $DB_NAME
exit
I ended failing because a func_pgsql directory does not exist in my Search-OpenFTS-tcl-0.3.2.tar.gz. I then went back to sourceforge and downloaded a fresh one to be sure mine was valid. Same deal. So then I bravely/desperately decided to continue as if it was all ok;( The load of _int.sql worked after all.

Then I mounted the FTS Driver in the Site Map (I didn't realize this needed to be mounted before). But now when I try to go to the FTS Driver admin page and Initialize OpenFTS Engine I get some ugly stuffs:


Request Error



Database operation "dml" failed

ERROR:  Unable to locate type name 'txtidx' in catalog

SQL: create table txt ( tid int not null primary key, path varchar unique, fts_index txtidx, last_modified timestamp );
    while executing
"error "$err""
    invoked from within
"if [catch {
    db_dml create_table "create table $table_name ( ${table_id} int not null primary key, path varchar unique, fts_index txtidx, last_modi..."
    ("uplevel" body line 21)
    invoked from within
"uplevel {
    	  ad_page_contract {

    Initialize OpenFTS

    @author Neophytos Demetriou

} {
    table_name
    table_id
    dict
    numbergroup..."
    (procedure "code::tcl::/www/nsroot/openacs-dev/packages/openfts-driver/w..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	$handler
      } ad_script_abort val {
	# do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

What am I missing? Is it the func_pgsql stuff that should have been with Search-OpenFTS? All thoughts welcome!

Collapse
Posted by tammy m on
Oh yeah, I forgot to mention that I also did what you suggested:
When it is restarted. Visit the parameters of the newly created openfts-driver package and set the tcl-src-path to the path to the openfts code.
This appeared to work fine.
Collapse
Posted by Dave Bauer on
The Openfts tcl 0.3.2 distribution has everything you need.

Try the AOLSERVER.INSTALL file. If you follow all those steps, it should work. It explains how to build and install the the pieces of openfts.

After that you need to install the openfts-driver in your openacs install.

There are two sql files you need to run on your database to build the required things for openfts to work.

So, again, check the AOLSERVER.INSTALL included in OpenFTS. It helped me get everything working.

Collapse
Posted by tammy m on
Oh this is great. It turns out what I did was apply the 2 sql files to template1 db in postgres. Since I had already created my database for OpenACS to use, obviously the changes to template1 did not show up in my OpenACS db. Nothing like being new to OpenACS, tcl, AOLserver and postgres all at the same time. Sigh. (Why did I decide to do it this way when I have been using apache, jsp/jhtml + solid or oracle for so long?)

So in addition to adding the FTS sql to template1, if you have a working OpenACS database already, also add the FTS sql to that database! (duh)

  cd $POSTGRES_SRC/contrib/pgsql_contrib_openfts
  psql template1 < openfts.sql
  psql openacs < openfts.sql

  cd $POSTGRES_SRC/contrib/tsearch
  psql template1 < tsearch.sql
  psql openacs < tsearch.sql

Thanks again fer yer help getting started:)