Answer the question
In order to leave comments, you need to log in
What to do if reindexing does not work?
Good day everyone!
The problem I am writing about is: search reindexing does not work (Settings - Search - Reindexing) leads to a 404 page in the admin panel ... in the search bar the text: https://www.hors.by/bitrix/admin/search_re
I.e. it turns out that it somehow itself removes the rest of index.php .
I tried to trick the system and created a copy of search_reindex.php with the name search_re.php, but when called, something goes wrong, the admin panel opens in the admin panel and it seems to me that it does not work ....
As for the reasons for this question, then Here's what: I
set up a search in the Catalog, removed the description from the search and added the following code:
AddEventHandler("search", "BeforeIndex", "BeforeIndexHandler");
function BeforeIndexHandler($arFields) {
$arrIblock = array(11);
$arDelFields = array("DETAIL_TEXT", "PREVIEW_TEXT") ;
if (CModule::IncludeModule('iblock') && $arFields["MODULE_ID"] == 'iblock' && in_array($arFields["PARAM2"], $arrIblock) && intval($arFields["ITEM_ID"]) > 0){
$dbElement = CIblockElement::GetByID($arFields["ITEM_ID"]) ;
if ($arElement = $dbElement->Fetch()){
foreach ($arDelFields as $value){
if (isset ($arElement[$value]) && strlen($arElement[$value]) > 0){
$arFields["BODY"] = str_replace (CSearch::KillTags($arElement[$value]) , "", CSearch::KillTags($arFields["BODY"]) );
}
}
}
return $arFields;
}
}
function BeforeIndexHandler($arFields) {
$arrIblock = array(11);
$arDelFields = array("DETAIL_TEXT", "PREVIEW_TEXT") ;
also a reindexing line: $Result = CSearch::ReIndexAll(true, 60); Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question