Linking up the criteria to the search api