search::object_index (public)

 search::object_index -object_id object_id [ -event event ]

Defined in packages/search/tcl/search-procs.tcl

Indexes an object by invoking the proper datasource and callbacks.

Switches:
-object_id (required)
-event (optional, defaults to "UPDATE")
Returns:
datasource as dict

Partial Call Graph (max 5 caller/called nodes):
test_object_utilities object_utilities (test search) search::object_index search::object_index test_object_utilities->search::object_index acs_object_type acs_object_type (public) search::object_index->acs_object_type acs_sc::invoke acs_sc::invoke (public) search::object_index->acs_sc::invoke callback callback (public) search::object_index->callback callback::impl_exists callback::impl_exists (public) search::object_index->callback::impl_exists search::content_get search::content_get (private) search::object_index->search::content_get search::indexer search::indexer (private) search::indexer->search::object_index

Testcases:
object_utilities
Source code:
    set driver [search::driver_name]
    if {$driver eq ""} {
        return
    }

    array set d [search::object_datasource -object_id $object_id]
    if {[array size d] == 0} {
        return
    }

    search::content_get txt  $d(content)  $d(mime)  $d(storage_type)  $object_id

    if {[callback::impl_exists -callback search::index -impl $driver]} {
        callback -impl $driver search::index  -object_id $object_id  -content $txt  -title $d(title)  -keywords $d(keywords)  -package_id $d(package_id)  -community_id $d(community_id)  -relevant_date $d(relevant_date)  -datasource d
    } else {
        acs_sc::invoke  -contract FtsEngineDriver  -operation [expr {$event eq "UPDATE" ? "update_index" : "index"}]  -call_args [list  $d(object_id)  $txt  $d(title)  $d(keywords)]  -impl $driver
    }

    set object_type [acs_object_type $object_id]

    #
    # Call the action so other people who do indexey things have a
    # hook.
    #
    callback -catch search::action  -action $event  -object_id $object_id  -datasource d  -object_type $object_type

    return [array get d]
XQL Not present:
PostgreSQL
Generic XQL file:
packages/search/tcl/search-procs.xql

Oracle XQL file:
packages/search/tcl/search-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: