Added support for passing a map into the search method