Documentation

OnBeforeIndexDelete

void
handler function (
string strWhere );

"OnBeforeIndexDelete" event is called prior to deleting a portion of search index.

Parameters

Parameter Description
strWhere SQL condition for deletion. Filter for the SEARCH_CONTENT_ID field.

Example of handler function:

<?

// register the "OnBeforeIndexDelete" event handler of the "search" module
RegisterModuleDependences("search", "OnBeforeIndexDelete", "my_module", "CMyModule", "DeleteSearchExtData");

// create TruncateTables function method within the CMyModule class in my_module
public static function DeleteSearchExData($strWhere)
{
global $DB;
$DB->Query("delete from my_search_ext_data where ".$strWhere);
}

?>


© «Bitrix24», 2001-2024
Up