Update the Search example by adding the method