Forum OpenACS Development: Error in OpenFTS 0.3.1

Collapse
Posted by Dave Bauer on
I am getting this error using the latest search and openfts driver pacakges with OpenFTS 0.3.1 installed today.
[15/Nov/2002:22:20:05][15640.32771][-sched-] Notice: 
Querying 'select * from fts_conf order by name,did asc;'

[15/Nov/2002:22:20:05][15640.32771][-sched-] Error: Ns_PgExec: result status: 7 message: 
ERROR:  Attribute 'name' not found
The fts_conf table looks like this:
openacs4=# \d fts_conf
            Table "fts_conf"
 Column |       Type        | Modifiers 
--------+-------------------+-----------
 did    | integer           | not null
 mod    | character varying | not null
 param  | character varying | 
Primary key: fts_conf_pkey

This is a new install of OpenACS 4.6 branch cvs updated this afternoon. There if definitely no name column in the fts_conf table. I am not sure if this is a query referring to the previous version of OpenFTS or an error on my part.
Collapse
2: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dave Bauer on
Here is more of the log Looks like the problem is in Search::OpenFTS::Base::new opt
[15/Nov/2002:22:26:35][15640.32771][-sched-] Error: Database operation "select" 
failed (exception NSDB, "Query was not a statement returning rows.")
Database operation "select" failed (exception NSDB, "Query was not a statement r
eturning rows.")
    while executing
"ns_pg_bind select nsdb1 {select * from fts_conf order by name,did asc}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec select $db $full_statement_name $sql"
    invoked from within
"set selection [db_exec select $db $full_statement_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
        set selection [db_exec select $db $full_statement_name $sql]

        set counter 0
        while { [db_getrow $db $selection] } {
            incr co..."
    (procedure "db_foreach" line 35)
    invoked from within
"db_foreach get_config_data "select * from $self(PREFIX)fts_conf order by name,d
id asc" {
        if [array exists t_param] {
            unset t_param..."
    (procedure "Search::OpenFTS::Base::new" line 27)
    invoked from within
"Search::OpenFTS::Base::new opt"
    (procedure "Search::OpenFTS::Index::new" line 3)
    invoked from within
"Search::OpenFTS::Index::new"
    (procedure "openfts_driver__index" line 10)
    invoked from within
"openfts_driver__index $object_id $txt $title $keywords"
    (procedure "AcsSc.FtsEngineDriver.index.openfts-driver" line 1)
    invoked from within
"AcsSc.FtsEngineDriver.index.openfts-driver 3151 {One Two Three.} {Test 3} {}"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
:

Collapse
3: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dan Wickstrom on
Dave, that fts_conf table corresponds to openfts 0.2.  You need to drop the old openfts tables and intialize the new openfts-driver from the admin page.
Collapse
4: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dave Bauer on
Ok, The problem was openfts-driver was loading openfts 0.2 tcl code instead of 0.3. I submitted a bug report and patch here: Now I am getting this error in the OpenFTS code:
[15/Nov/2002:23:33:33][16489.32771][-sched-] Error: invalid command name "end_pa
rse"
invalid command name "end_parse"
    while executing
"end_parse"
    (procedure "Search::OpenFTS::Parser::end_parser" line 2)
    invoked from within
"Search::OpenFTS::Parser::end_parser"
    (procedure "Search::OpenFTS::Index::_addtxt" line 30)
    invoked from within
"Search::OpenFTS::Index::_addtxt self struct $title"
    (procedure "Search::OpenFTS::Index::index" line 7)
    invoked from within
"Search::OpenFTS::Index::index idx $tid $txt $title"
    (procedure "openfts_driver__index" line 12)
    invoked from within
"openfts_driver__index $object_id $txt $title $keywords"
    (procedure "AcsSc.FtsEngineDriver.index.openfts-driver" line 1)
    invoked from within
"AcsSc.FtsEngineDriver.index.openfts-driver 3155 {Here is the latest test.} {Tes
t 3 i think} {}"
    ("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 index [list $datasource(object_id) $txt $datasource
(title) $datasource(keywords)] $driver"
    ("INSERT" arm line 7)
    invoked from within
"switch $event {
            INSERT {
                set object_type [acs_object_type $object_id]
                if {[acs_sc_binding_exists_p FtsCont..."
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $code_block "
    ("1" arm line 1)
    invoked from within
"switch $errno {
:
It looks like it is trying to INSERT the content of the item into the index.
Collapse
5: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dan Wickstrom on
Yes, the default points to the 0.2 instead of 0.3.1.  That will be fixed in the next release.

end_parse is a c-routine that is loaded with nsfts.so.  It appears that it's not getting loaded correctly.  Look for an error earlier in your log file.

Collapse
6: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dave Bauer on
Collapse
7: Re: Error in OpenFTS 0.3.1 (response to 1)
Posted by Dave Bauer on
Thanks alot Dan! I double checked and recopied the 0.3.1 nsfts.so into aolserver/bin. It is loading without error:
[15/Nov/2002:23:47:25][16598.16384][-main-] Notice: modload: loading '/usr/local
/aolserver/bin/nsfts.so'
I am tried, so I'll try again tomorrow :)