The chapters so far have covered most of the basic query mechanisms to find one or a series of documents by given criteria. There are a number of mechanisms for finding given documents to bring them back to your application so they can be processed. But sometimes these normal query mechanisms fall short, and you might need to perform complex operations over most or all of the documents in your collection. When queries or operations of this kind are required, many developers either iterate through all documents in the collection or write a series of queries to be executed in sequence to perform the necessary calculations. Although this is a valid way of doing things, it can be burdensome to write and maintain, as well as inefficient. It is for these reasons that MongoDB has some advanced query mechanics that you can use to derive the most from your data. The advanced MongoDB features we’ll examine in this chapter are full-text search, the aggregation framework, and the MapReduce framework.