Magento reindex price product

magento

When you save a product in Magento’s backend admin console application, the system will reindex the price information for that product.
But when you use $product->save() then that product will don’t update immediately to frontend, concrete is in list in search result

Magento reindex price product
To resolve this issue, you only need running this code after save() function:

//index for change product
$resourceIndexPrice = new Mage_Catalog_Model_Resource_Product_Indexer_Price;
$resourceIndexPrice->reindexProductIds($productId);

After, reload and get result

Thanks for whatching!