Updated searchAttributes method.