I've tried to do these but nothing worked:
Mage::getSingleton('catalogsearch/fulltext')->cleanIndex(null, $productId);
$storeIds = $product->getStoreIds();
foreach($storeIds as $storeId) {
$searchIndex = ' ' . $product->getName() . ' ' . $product->getSku() . ' ';
Mage::getResourceModel('catalogsearch/fulltext_engine')->saveEntityIndex($productId, $storeId, $searchIndex);
}
This also didn't work:
$processes = Mage::getSingleton('index/indexer')->getProcessesCollection()->addEventsStats();
$observer->getProduct()->getResource()->refreshIndex($observer->getProduct());
Mage::getSingleton('catalogsearch/fulltext')->cleanIndex(null, $productId);
$storeIds = $observer->getProduct()->getStoreIds();
foreach($storeIds as $storeId) {
Mage::getResourceModel('catalog/product_flat_indexer')->updateProduct($productId, $storeId);
}
This also didn't work:
$product = $observer->getProduct();
$product->setForceReindexRequired(1)->setIsChangedCategories(1);
$product->dataHasChangedFor('name');
$indexerCodes = [
'catalog_product_attribute',
'catalog_product_attribute',
'catalog_product_flat',
'catalog_product_price',
'catalogsearch_fulltext',
'catalog_url'
'cataloginventory_stock',
'catalog_category_flat',
'catalog_category_product',
];
$event = Mage::getSingleton('index/indexer')->logEvent(
$product,
$product->getResource()->getType(),
Mage_Index_Model_Event::TYPE_SAVE,
false
);
I know that I can find couple of similar questions and answers here and there but I still cannot find fully working solution to reindex only one specific product.