Index: openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl,v diff -u -r1.7.2.7 -r1.7.2.8 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 30 Dec 2004 14:01:18 -0000 1.7.2.7 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 30 Dec 2004 14:25:18 -0000 1.7.2.8 @@ -134,7 +134,8 @@ if {[string is integer $offset]} { set offset_clause " offset :offset " } - set query_text "select object_id from txt where fti @@ to_tsquery('default',:query) and exists (select 1 from from acs_object_party_privilege_map m + set query_text "select object_id from txt where fti @@ to_tsquery('default',:query) and exists (select 1 + from acs_object_party_privilege_map m where m.object_id = txt.object_id and m.party_id = :user_id and m.privilege = 'read')order by rank(fti,to_tsquery('default',:query)) ${limit_clause} ${offset_clause}"