Refactored index saving in tagrecommendation