Forum OpenACS Q&A: Re: tsearch2 and openacs 5.4.3

Collapse
Posted by Gustaf Neumann on
Seems as you have a problem with the version mix. The released versions of openacs support only postgres 8.2.*, the development version in head works with postgres 8.3.
I would recommend to use postgres 8.2 for the time being.

On my notebook, i have postgres 8.3 + the head version of OpenACS, search works, but the query i see is

select txt.object_id from txt, acs_objects o
 where fti @@ to_tsquery('hello')
   and exists (select 1
               from acs_object_party_privilege_map m
               where m.object_id = txt.object_id
                 and m.party_id = '539'
                 and m.privilege = 'read')
and o.package_id in (849) and o.object_id = txt.object_id
 order by ts_rank(fti,to_tsquery('hello')) desc
  limit 10   offset 0

xowiki implements the search interface via a service contract. look for FtsContentProvider and datasource in xowiki-sc-procs

I have to rush...

best regards
-gustaf neumann

Collapse
Posted by Richard Hamilton on

Gustaf,

As I already have postgres 8.3 installed and working I'd prefer to try to thrash this out if I possibly can. If necessary I can delete my db and install from a HEAD checkout. My site is at an early stage of development anyway so by the time it is ready the oacs code will probably be at a release state anyway.

I have installed the HEAD co versions of categories, acs-kernel, acs-service-contract, search and tsearch2-driver but I still get no indexed content and I cannot add a category because of the form vars error earlier posted which remains unchanged as follows:

When selecting

http://63.246.8.12:8000/categories/cadmin/


the response is:

can't read "form_vars": no such variable
    while executing
"lang::util::localize ${form_vars}"
    invoked from within
"if {[string equal "[ad_quotehtml [lang::util::localize ${change_locale}]]" "t"] && ! ([template::util::is_nil languages])} {
append __adp_output "
  <..."
    ("uplevel" body line 10)
    invoked from within


......with no preceeding error in the error log.

Here are the relevant installed service contracts:

FtsContentProvider   	Full Text Search Content Provider
FtsEngineDriver 	Full Text Search Engine Driver 

Here are the relevant installed bindings:

FtsContentProvider     ::xowiki::File     ::xowiki::File     xowiki     Uninstall
FtsContentProvider     ::xowiki::FormPage     ::xowiki::FormPage     xowiki     Uninstall
FtsContentProvider     ::xowiki::Page     ::xowiki::Page     xowiki     Uninstall
FtsContentProvider     ::xowiki::PageInstance     ::xowiki::PageInstance     xowiki     Uninstall
FtsContentProvider     ::xowiki::PlainPage     ::xowiki::PlainPage     xowiki     Uninstall
FtsEngineDriver     tsearch2-driver     tsearch2-driver     tsearch2-driver     Uninstall

Do I need an acs category defined before xowiki will index content?

Regards
Richard

Collapse
Posted by Gustaf Neumann on
Concerning categories, see: https://openacs.org/forums/message-view?message_id=2472683

Concerning search, the problem with PostgreSQL 8.3 should be gone, if you use the head version of the tsearch2-driver.