search function convert to yaml