Forum .LRN Q&A: Re: Res: Re: Bug in search with postgres

Posted by Jose Agustin Lopez Bueno on

but I am seeing the code and I think of that that code is running, both Postgres and Oracle:

ad_proc -private search::indexer {} {
Search indexer loops over the existing entries in the search_observer_queue
table and calls the appropriate driver functions to index, update, or
delete the entry.

@author Neophytos Demetriou
@author Jeff Davis (
} {

set driver [ad_parameter -package_id [apm_package_id_from_key search] FtsEngineDriver]

if { $driver eq ""
|| (![callback::impl_exists -callback search::index -impl $driver] && ! [acs_sc_binding_exists_p FtsEngineDriver $driver])} {
# Nothing to do if no driver
ns_log Debug "search::indexer: driver=$driver binding exists? [acs_sc_binding_exists_p FtsEngineDriver $driver]"
# 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');