added search method for metadata search api, and changed old search to be match