Added search method

Added a method to search for the indexes of all matching objects.