Removed foreachsearchresult function