CSearch::Index( string MODULE_ID, string ITEM_ID, array arFields, bool bOverWrite = false, string SEARCH_SESS_ID = '' );

Method re-indexes a singular position (a post post, news item and etc.). The combination (MODULE_ID, ITEM_ID) is used to specify the re-indexed document. Static method.

At the start of indexing the BeforeIndex event is called. Then the user weight for the position is calculated. Then, the re-indexing itself is performed.

Method parameters

Parameter DescriptionAvailable from version
MODULE_ID Code of the module, to which the indexed element belongs to.
ITEM_ID Code of the indexed element.
arFields Array of indexed element properties.
bOverWrite Rewrite the search index for the element, if the element has already been indexed. Optional parameter, equals false by default.
SEARCH_SESS_ID Service parameter, used during incremental re-indexing.

Examples of use

"URL"=>str_replace("#ID#", $arIBlockElement["ID"], $DETAIL_PAGE_URL),

© «Bitrix24», 2001-2023