Forum OpenACS Development: tsearch2 error

Collapse
Posted by Iuri Sampaio on
I've got the error when i try to search for a keyword

No reasons for that error. I have installed tsearch2

# Install tsearch2
su - postgres -c "cd /usr/local/src/postgresql-${PG_VERSION}/contrib/tsearch2 && make install"
su - postgres -c "psql -U postgres -f /usr/local/src/postgresql-${PG_VERSION}/contrib/tsearch2/tsearch2.sql template1"

# Install ltree
su - postgres -c "cd /usr/local/src/postgresql-${PG_VERSION}/contrib/ltree && make install"
su - postgres -c "psql -U postgres -f /usr/local/src/postgresql-${PG_VERSION}/contrib/ltree/ltree.sql template1"

any ideas?

[11/Feb/2009:10:17:55][32661.3013663664][-sched:idle0-] Notice: starting
[11/Feb/2009:10:17:55][32661.3032816560][-conn:projop::2] Error: GET http://10.5.100.50:8090/intranet-search/search?type=all&q=Dispatch
referred by "http://10.5.100.50:8090/intranet/";
Database operation "0or1row" failed
(exception NSDB, "Query was not a statement returning rows.")
pqerror was: "ERROR: could not find tsearch config by locale
"
(Status of PQexec call: PGRES_FATAL_ERROR)
SQL: select headline('dispatch .. dispatch 2009 0001 2009 0001 ', 'dispatch'::tsquery)

while executing
"ns_pg_bind 0or1row nsdb1 {select headline(:text, :q::tsquery)}"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
invoked from within
"db_exec 0or1row $db $full_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "db_string" line 8)
invoked from within
"db_string headline "select headline(:text, :q::tsquery)" -default """
invoked from within
"set headline [db_string headline "select headline(:text, :q::tsquery)" -default ""]"
("uplevel" body line 19)
invoked from within
"uplevel 1 $code_block "
("while" body line 1)
invoked from within
"while { [db_getrow $db $selection] } {
incr counter
if { [info exists array_val] } {
unset array_val
..."
("uplevel" body line 5)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec select $db $full_statement_name $sql]

set counter 0
while { [db_getrow $..."
(procedure "db_foreach" line 36)
invoked from within
"db_foreach full_text_query $sql {

incr count

# Skip further permissions checking if we reach the
# maximum number of records. However, k..."
("uplevel" body line 475)
invoked from within
"uplevel {
# packages/intranet-search-pg/www/search.tcl
#
# Copyright (C) 1998-2004 various parties
# The code is based on ArsDigita ACS 3.4
#
#..."
(procedure "code::tcl::/web/projop/packages/intranet-search-pg/www/searc..." 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 5)
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..."
[11/Feb/2009:10:17:55][32661.3013663664][-sched:20-] Debug: Running scheduled proc im_cost_cache_sweeper...
[11/Feb/2009:10:17:55][32661.3013663664][-sched:20-] Notice: Querying '

Collapse
2: Re: tsearch2 error (response to 1)
Posted by Dave Bauer on
What version of Postgresql and tsearch2-driver/openacs are you using?
Collapse
3: Re: tsearch2 error (response to 2)
Posted by Iuri Sampaio on
postgesql version: 8.2.7

tsearch2-driver version: tsearch2.8.2.5.sql

Collapse
5: Re: tsearch2 error (response to 3)
Posted by Dave Bauer on
Are you using the HEAD version of tsearch2-driver or the openacs 5.4 version (or somet other version.)

In PostgreSQL 8.3 the want tsearch2 is used was changed and the default config stuff was changed around. I believe Don fixed it so that HEAD will work with PG 8.2 or 8.3. If you have the HEAD version but its still not working, double check that you have the latest version from CVS.

If you are using the 5.4 version it should work out of the box as all the queries specify the default config.

Collapse
4: Re: tsearch2 error (response to 1)
Posted by Frank Bergmann on
Hi Iuri,

ERROR: could not find tsearch config by locale

Please search Google for these magic words and maybe add "project-open" to them, and you'll see a number of postings + you will find that this issue and it solution is explained in the PO-Configuration-Guide.

Cheers!
Frank