Index: openacs-4/packages/search/tcl/search-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-init.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/search/tcl/search-init.tcl 5 Nov 2006 12:38:02 -0000 1.8 +++ openacs-4/packages/search/tcl/search-init.tcl 20 Jul 2007 10:41:15 -0000 1.9 @@ -2,7 +2,7 @@ ad_schedule_proc -thread t [parameter::get_from_package_key -package_key search -parameter SearchIndexerInterval -default 60 ] search::indexer -if {[ns_config "ns/db/drivers" postgres] eq ""} { +if {[ns_config "ns/db/drivers" oracle] ne ""} { ad_schedule_proc -thread t 14400 db_dml optimize_intermedia_index {Ctx_Ddl.Optimize_Index ('swi_index','FAST', 60)} } 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.40 -r1.41 --- openacs-4/packages/search/tcl/search-procs.tcl 14 May 2007 20:30:29 -0000 1.40 +++ openacs-4/packages/search/tcl/search-procs.tcl 20 Jul 2007 10:41:15 -0000 1.41 @@ -108,14 +108,19 @@ } # JCD: pull out the rows all at once so we release the handle foreach row [db_list_of_lists search_observer_queue_entry {}] { - nsv_incr search_static_variables item_counter - if {[nsv_get search_static_variables item_counter] > 1000} { - nsv_set search_static_variables item_counter 0 - db_exec_plsql optimize_intermedia_index {begin - ctx_ddl.sync_index ('swi_index'); - end; + + # DRB: only do Oracle shit for oracle (doh) + if { [ns_config "ns/db/drivers" oracle] ne "" } { + nsv_incr search_static_variables item_counter + if {[nsv_get search_static_variables item_counter] > 1000} { + nsv_set search_static_variables item_counter 0 + db_exec_plsql optimize_intermedia_index {begin + ctx_ddl.sync_index ('swi_index'); + end; + } } } + foreach {object_id event_date event} $row { break } array unset datasource switch -- $event {