fix the search controller to fit the new JSON serach API