Инструменты пользователя

Инструменты сайта


programming:1c-bitrix:index

Индексирование

$arSearchIndex = array(
	"SITE_ID" => $arCommentSite,
	"LAST_MODIFIED" => $arComment["DATE_CREATE"],
	"PARAM1" => "COMMENT",
	"PARAM2" => $arComment["BLOG_ID"]."|".$arComment["POST_ID"],
	"PERMISSIONS" => array(2),
	"TITLE" => $arComment["TITLE"],
	"BODY" => blogTextParser::killAllTags($arComment["POST_TEXT"]),
);

if(strlen($arComment["TITLE"]) <= 0)
{
	$arPost = CBlogPost::GetByID($arComment["POST_ID"]);
	$arSearchIndex["TITLE"] = $arPost["TITLE"];
}


CSearch::Index("blog", "C".$ID, $arSearchIndex);

Удаление

if (CModule::IncludeModule("search"))
{
	CSearch::DeleteIndex("blog", false, "POST", $ID);
	CSearch::DeleteIndex("blog", "B".$ID);
}

Полная

		if (CModule::IncludeModule("search"))
			CSearch::ReIndexModule("blog");
programming/1c-bitrix/index.txt · Последнее изменение: 2017/03/27 11:26 — artur

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki