Added some functions to Search to check the existence of IDs.