For an XML database, it is important to automatically reason meaningful answers for a given keyword query. Particularly, the MaxMatch algorithm is proposed to output contributors, which represent more (or equal number of) keywords than those contained by their sibling nodes. Such concept can distinguish the importance of sibling nodes and has attracted a lot of attention. In this paper, we intend to improve the time and space performance of the original approach. We first propose the LevelPrune algorithm, which only needs to construct the smallest necessary intermediate tree and can also reduce the times of processing nodes. We then extend the idea of constructing trees level by level to optimize physical representations, and design the corresponding algorithm LevelPrune+. According to the experimental results, our proposed algorithms outperform other stateof- the-art approaches by an order of magnitude in some cases. Moreover, the index size of LevelPrune+ is significantly reduced compared with that of the original approach.