Forum OpenACS Q&A: troubles with openfts

Collapse
Posted by jose arceiz on
i finished the setup for site wide search i followed the instructions
and everything was fine but when i trying to search for anything i get
the nexy error:
nvalid command name "start_parse_str"
    while executing
"start_parse_str $rtxt"
    (procedure "Search::OpenFTS::Parser::start_parser" line 5)
    invoked from within
"Search::OpenFTS::Parser::start_parser $sstr"
    (procedure "Search::OpenFTS::get_sql" line 41)
    invoked from within
"Search::OpenFTS::get_sql self $query opt"
    (procedure "openfts_driver__search" line 18)
    invoked from within
"openfts_driver__search $query $offset $limit $user_id $df $dt"
    (procedure "AcsSc.FtsEngineDriver.search.openfts-driver" line 1)
    invoked from within
"AcsSc.FtsEngineDriver.search.openfts-driver dagasdb 0 10 2537 {} {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call FtsEngineDriver search [list $q $offset $limit $user_id
$df $dt] $driver"
    invoked from within
"array set result [acs_sc_call FtsEngineDriver search [list $q $offset
$limit $user_id $df $dt] $driver]"
    ("uplevel" body line 59)
    invoked from within
"uplevel {
          ad_page_contract {
    @author Neophytos Demetriou <mailto:k2pts@cytanet.com.cy>
@creation-date September 01, 2001
    @cvs-id $Id: sear..."
    (procedure "code::tcl::/web/cazurra/packages/search/www/search"
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
..."

i got the same one in two different installations with postgres 7.1.3
and postgres 7.2 .

Thanks

Collapse
Posted by Dave Bauer on
Have you installed and mounted the openfts-driver package?
Collapse
Posted by jose arceiz on
yes i installed and mounted the package-

Thanks

Collapse
Posted by Dan Wickstrom on
It sounds like the openfts source files are not getting sourced at startup.  Did you set the openfts source path parameter in the openfts-driver?  It defaults to /usr/local/src/Search-OpenFTS-tcl-0.1, and it's likely you have openfts located somewhere else.
Collapse
Posted by Kevin Lange on
Hey all, I'm getting the same error message as above (I'll post it in a nicer format below). I checked what Dan mentions in his response and my path to OpenFTS seems to be fine but since the original poster never responds I can't verify that is what his problem was. I'm still getting used to reading these error messages so please bear with my ignorance. It appears that the error is it can't find a definition for the subroutine start_parse_str which is located in file fts_parser.tcl. I've checked all the other files in the Search-OpenFTS-tcl-0.2 directory but this subroutine is not defined anywhere that I can see. Is that a correct assessment of the problem? If so, where should the logic for this reside? I thought I had followed the instructions for installation of the driver strictly so am not sure where I might have strayed from the path.

I've looked around at the forums and the only other post that I could see that was similar was. But, the solution here was they reinstalled which I'd prefer not to do since I've got everything else pretty much setup and working nicely. Thanks.

invalid command name "start_parse_str"
    while executing
"start_parse_str $rtxt"
    (procedure "Search::OpenFTS::Parser::start_parser" line 5)
    invoked from within
"Search::OpenFTS::Parser::start_parser $sstr"
    (procedure "Search::OpenFTS::get_sql" line 41)
    invoked from within
"Search::OpenFTS::get_sql self $query opt"
    (procedure "openfts_driver__search" line 18)
    invoked from within
"openfts_driver__search $query $offset $limit $user_id $df $dt"
    (procedure "AcsSc.FtsEngineDriver.search.openfts-driver" line 1)
    invoked from within
"AcsSc.FtsEngineDriver.search.openfts-driver try 0 10 2537 {} {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call FtsEngineDriver search [list $q $offset $limit $user_id $df $dt] $driver"
    invoked from within
"array set result [acs_sc_call FtsEngineDriver search [list $q $offset $limit $user_id $df $dt] $driver]"
    ("uplevel" body line 59)
    invoked from within
"uplevel {
    	  ad_page_contract {
    @author Neophytos Demetriou <k2pts@cytanet.com.cy>
    @creation-date September 01, 2001
    @cvs-id $Id: sear..."
    (procedure "code::tcl::/web/testnet/packages/search/www/search" 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 3)
    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..."
Collapse
Posted by Dan Wickstrom on
start_parse_str should be defined in Parser.c.  Did you build nsfts.so and copy it to the aolserver bin dir?
Collapse
Posted by Kevin Lange on
Thanks for the response. I had to take two steps two steps to get search working. First the error message above was created because I had missed the step involving the aolserver config file:
ns_param nsfts   ${bindir}/nsfts.so
Secondly, after fixing the above I had a database error when I tried a search. After doing some searching in the forums I figured out that the problem was with the load.sql file. It was referencing Postgresql ver 7.1.3 where as mine was 7.2.1. So, changing that, and then loading it into the database got it working okay. I do have a one other question. I have a number of forums and I expected that when I did a seach it would find forum entries that matched but it didn't do so. How do I make it such that forum entries will show up when a search occurs? I'm guessing I need to link it like I did for the notes but am not sure how to do this.
Collapse
Posted by Dan Wickstrom on
Unfortunately, forums doesn't use the CR, so it doesn't automatically pick up a search capablity.  notes-sc-create.sql has an example of how to make a non-CR enabled package work with the search package, and you should be able to adapt it to forums, but I thought somebody was modifying forums (for the new site - Dave Bauer perhaps?) to work with openfts.
Collapse
9: Re: troubles with openfts (response to 1)
Posted by Gilbert Price on
Has there been any information for getting openfts indexing and searching through the forums package? I'm using 4.6 and I didn't see anything in the forums/sql directory that looks like notes-sc-create.sql...

Any information about how openacs.org got openfts search working for the forums will be greatly appreciated.

Also, I'm betting ETP is another one of those apps not searched by openfts. If not, has anybody done the work to get openfts and ETP working together?

Thanks...

Collapse
10: Re: troubles with openfts (response to 9)
Posted by Bart Teeuwisse on
Gilbert,

you'll find the necessary files in the openacs.org-dev repository. These changes haven't been comitted to openacs-4 repository. Checkout a copy of the packages/forums/sql/postgresql/ directory in the openacs.org-dev repository and move the forums-sc-create.sql and forums-sc-drop.sql files to your openacs-4 copy of the forums package.

Then run the forums-sc-create.sql script in your database to enable openfts searching.

The ETP pages are searchable by virtue of the content repository (CR). However, link to the indexed content as returned by the content repository uses CR templates. If that is not what you want then read https://openacs.org/forums/message-view?message_id=68487.

/Bart

Collapse
Posted by Geert De Witte on
Bart,

I've been to http://cvs.openacs.org/cvs/openacs-4/packages/forums/sql/postgresql/ to try and pick up the 2 SQL files you refer to, but they don't seem to exist. Am I looking in the right place? If not, could you possibly let me know where I can get hold of them

TIA
Geert

Collapse
Posted by Bart Teeuwisse on
Geert,

you'll find the files in the openacs.org-DEV repository:

http://cvs.openacs.org/cvs/openacsorg-dev/packages/forums/sql/postgresql/

/Bart