Documentation

ReIndexFile

int
CSearch::ReindexFile( string path, string SEARCH_SESS_ID="" );

The method re-index the specified file. Static method.

First, it is determined whether this file and its size satisfy the search module settings. If one of such checks is unsuccessful, then "0" is returned. After that, link=6657585]OnSearchGetFileContent[/link] event handlers of the "search" module are called. After one of the handlers returns result not equal to false, others handlers will not be called next. Finally, the CSearch::Index method is called.

Method parameters

Parameter DescriptionAvailable from version
path Path to re-indexed file relative to site root. From version 12.0.3 if $path is not array, then the method returns "0". Recommended format: $path = array(SITE_ID, "/path/from/SiteDocRoot");
SEARCH_SESS_ID Service parameter, used in incremental re-indexing.

Returned value

The method returns unique identifier in the search index on success and returns "0" otherwise on failure.

See Also



© «Bitrix24», 2001-2024
Up