Skip to main content
Add code indentation
Source Link
Hishaam Namooya
  • 9.7k
  • 1
  • 19
  • 37

For updating the index for a specific item, you can use the IndexCustodian

var toIndex = ContentSearchManager.GetIndex("sitecore_products_index"); 

if(toIndex !=null= null) 
{
    var tempItem = (SitecoreIndexableItem)item;
    IndexCustodian.Refresh(toIndex,tempItem); 
}

The index custodian will start a job for updating your index.

For updating the index for a specific item, you can use the IndexCustodian

var toIndex = ContentSearchManager.GetIndex("sitecore_products_index");
if(toIndex!=null){var tempItem = (SitecoreIndexableItem)item;
IndexCustodian.Refresh(toIndex,tempItem);}

The index custodian will start a job for updating your index.

For updating the index for a specific item, you can use the IndexCustodian

var toIndex = ContentSearchManager.GetIndex("sitecore_products_index"); 

if(toIndex != null) 
{
    var tempItem = (SitecoreIndexableItem)item;
    IndexCustodian.Refresh(toIndex,tempItem); 
}

The index custodian will start a job for updating your index.

Source Link
adarsh
  • 818
  • 1
  • 7
  • 12

For updating the index for a specific item, you can use the IndexCustodian

var toIndex = ContentSearchManager.GetIndex("sitecore_products_index");
if(toIndex!=null){var tempItem = (SitecoreIndexableItem)item;
IndexCustodian.Refresh(toIndex,tempItem);}

The index custodian will start a job for updating your index.