To conduct an efficient visual search, visual attention must be guided to a target appropriately. Previous studies have suggested that attention can be quickly guided to a target when the spatial configurations of search objects or the object identities have been repeated. This phenomenon is termedcontextual cuing. In this study, we investigated the effect of learning spatial configurations, object identities, and a combination of both configurations and identities on visual search. The results indicated that participants could learn the contexts of spatial configurations, but not of object identities, even when both configurations and identities were completely correlated (Experiment 1). On the other hand, when only object identities were repeated, an effect of identity learning could be observed (Experiment 2). Furthermore, an additive effect of configuration learning and identity learning was observed when, in some trials, each context was the relevant cue for predicting the target (Experiment 3). Participants could learn only the context that was associated with target location (Experiment 4). These findings indicate that when multiple contexts are redundant, contextual learning occurs selectively, depending on the predictability of the target location.