How do you programmatically update an asset index?
This is what I ended up with which works great for me. 

$ses = craft()-&gt;assetIndexing-&gt;getIndexingSessionId(); 
$src = craft()-&gt;assetIndexing-&gt;getIndexListForSource($ses, 7); 

for ($i = 1; $i &lt;= $src['total']; $i++) { 
    craft()-&gt;assetIndexing-&gt;processIndexForSource($ses, $i, 7); 
}