add trigger for deleting resources from index