Updated search controller with condition updated