Index: openacs-4/packages/openfts-driver/openfts-driver.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/openfts-driver.info,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/openfts-driver/openfts-driver.info 11 Dec 2003 21:40:09 -0000 1.7
+++ openacs-4/packages/openfts-driver/openfts-driver.info 10 Mar 2005 01:42:15 -0000 1.8
@@ -7,13 +7,13 @@
f
t
-
+
postgresql
Neophytos Demetriou
- Full text search support for Search via OpenFTS.
- Provides an implementation for the search packages service contract for searching on postgresql.
+ Full text search support for Search via OpenFTS. Deprecated in favor of the tsearch2-driver in OpenACS 5.2.
+ Provides an implementation for the search packages service contract for searching on postgresql. Use tsearch2 instead.
Index: openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl 14 May 2004 10:51:21 -0000 1.8
+++ openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl 10 Mar 2005 01:42:15 -0000 1.9
@@ -12,10 +12,15 @@
limit
user_id
df
- dt
+ packages
} {
@author Neophytos Demetriou
} {
+ # JCD: I have done something horrible. I took out dt and
+ # made it packages. when you search there is no way to specify a date range just
+ # last six months, last year etc. I hijack what was the old dt param and make it
+ # the package_id list and just empty string for dt.
+ set dt {}
set result(count) 0
set result(ids) ""
@@ -55,12 +60,31 @@
append date_range_condition "'$dt' >= last_modified and"
}
+ # if we were passed package_ids restrict to those packages.
+ set ids {}
+ foreach id $packages {
+ if {[string is integer -strict $id]} {
+ lappend ids $id
+ }
+ }
+ if {![empty_string_p $ids]} {
+ set package_restrict " and object_id in (select o.object_id from acs_objects o where o.package_id in ([join $ids ,])"
+ } else {
+ set package_restrict {}
+ }
+
set permission_check_enabled_p [ad_parameter -package_id [apm_package_id_from_key openfts-driver] permission_check_enabled_p]
- set permission_check_condition ""
if { $permission_check_enabled_p } {
- append permission_check_condition "and acs_permission__permission_p( $self(TXTID), $user_id, 'read') = 't'"
+ append permission_check_condition "and exists (select 1
+ from acs_object_party_privilege_map m
+ where m.object_id = $self(TXTID)
+ and m.party_id = :user_id
+ and m.privilege = 'read')"
+ } else {
+ set permission_check_condition {}
}
+
set sql_count "
select count(*)
from $self(TABLE)
Index: openacs-4/packages/search/search.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/search/search.info,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/search/search.info 2 Feb 2005 21:18:02 -0000 1.21
+++ openacs-4/packages/search/search.info 10 Mar 2005 01:42:14 -0000 1.22
@@ -7,7 +7,7 @@
t
f
-
+
OpenACS
2005-01-09
3
@@ -18,22 +18,20 @@
Site wide search implemented with service contracts, currently
only supports postgres via the OpenFTS driver.
-
+
-
+
-
+
+
-
-
-
Index: openacs-4/packages/search/tcl/search-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-procs.tcl,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/search/tcl/search-procs.tcl 7 Mar 2005 20:47:07 -0000 1.20
+++ openacs-4/packages/search/tcl/search-procs.tcl 10 Mar 2005 01:42:14 -0000 1.21
@@ -9,19 +9,19 @@
ad_proc -public search::queue {
-object_id
- -event
+ -event
} {
Add an object to the search_observer_queue table with
an event.
You should excercise care that the entry is not being
- created from a trigger (although search is robust for multiple
+ created from a trigger (although search is robust for multiple
entries so it will not insert or update the same object
more than once per sweep).
@param object_id acs_objects object_id
@param event INSERT or UPDATE or DELETE
-
+
@author Jeff Davis (davis@xarg.net)
} {
package_exec_plsql \
Index: openacs-4/packages/search/www/advanced-search.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/advanced-search.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/search/www/advanced-search.adp 20 Feb 2005 17:18:03 -0000 1.5
+++ openacs-4/packages/search/www/advanced-search.adp 10 Mar 2005 01:42:14 -0000 1.6
@@ -1,6 +1,7 @@
#search.Advanced_Search#
"advanced search"
+ noindex,nofollow