Summary
Now, you should be well versed with how to query documents from Mongoid. We learned some interesting concepts about aggregation in MongoDB too! We saw how Origin is used to make Mongoid a better querying framework. There's still a long way to go.
In the next chapters, we will see how to improve our performance using Indexes and also how to tune MongoDB. We will also learn more about the aggregation framework and MapReduce!