Update search index after assets.onSaveAsset Event I use an assets.onSaveAsset Event in my plugin to update a field with the IPTC-Data of the image. 

  $asset-&gt;getContent()-&gt;keywords = $this-&gt;get_iptc_keywords($imgPath);
  craft()-&gt;elements-&gt;saveElement($asset);


It updates the field values of the asset, but it does not update the search index. When i resave the asset, the searchindex table is updatet and works. Is this a craft bug and is there a craft way to update the search index for a single element (not the full index). Otherwise do i need to update the index by writing plain sql update/insert statements? Thanks for any help...
You could try and listen to onBeforeSaveAsset events instead of onSaveAsset. With onBeforeSaveAsset you can modify the asset model before being saved, so you don't have to do that manually.