title: Magento Proper Way To Reindex Single Item and associated Group product
body: <p><strong>What is the proper way to reindex a single item after modifications have been made to it.</strong></p>
  
  <p>Example context:</p>
  
  <p>Our company relies on a third party inventory management platform called Stone Edge. We also sell items on multiple storefronts those include Magento, Amazon, Ebay and Buy.com </p>
  
  <p>Once every 10 minutes Stone Edge will download all orders from the sites and then send the inventory adjustments back to our Magento store. This is done by sending a simple http request to a php script stored on our webserver with an array of key value pairs for each of the items in inventory that have had an inventory change since the last update. </p>
  
  <p>After the save function is completed on each of these, the item is then re-indexed so as not to reflect a 0 inventory in-between the time of the update and the next sitewide re-index.</p>
  
  <p>I've located on the Magento forums discussion about how to re-index the item:</p>
  
  <pre><code>$item-&gt;setForceReindexRequired(true);
  Mage::getSingleton('index/indexer')-&gt;processEntityAction($item,Mage_CatalogInventory_Model_Stock_Item::ENTITY,Mage_Index_Model_Event::TYPE_SAVE);
  </code></pre>
  
  <p>Prior to this set of instructions you would see something like </p>
  
  <pre><code>$item = Mage::getModel('cataloginventory/stock_item')-&gt;loadByProduct($entityid);
  $item-&gt;addQty($change);
  $item-&gt;save();
  </code></pre>
  
  <p>However, after completing this, a problem became apparent. The items themselves were re-indexed, but if they were a member of a grouped product, then the group product was not updated.</p>
  
  <p>There is an obvious issue that I will need to address. What is the best approach to this problem?</p>
  
  <p>I will post an answer if I happen to come up with one.</p>