The explosion of collaborative tagging data nowadays prompts an urgent demand upon Web 2.0 communities in assisting users to search interested resources quickly and effectively. Such a requirement entails much research on utilization of tag-based user and resource profiles so as to provide a personalized search in folksonomies. However, one major shortage for existing methods is their uniform treatment of user profile in the same way for each query, hence the search context for each query is ignored. In this paper, we focus on addressing this problem by modeling the search context. To capture and understand user intention, a nested context model is proposed. Furthermore, we conduct the experimental evaluation upon a real life data set, and the experimental result demonstrates that our approach is more effective than baselines.