[search] Save the template of a collection