Advanced Filtering with MongoDB Aggregation Pipelines

Advanced Filtering with MongoDB Aggregation Pipelines

For a project Chris Were and I have been working on we discovered a great way of doing advanced queries using MongoDB’s Aggregation pipelines with the use of the $merge operator in order to filter down to a specific set of customers based on their demographics and purchasing behaviour.

For those that don’t know MongoDB’s aggregation pipeline is much more sophisticated and…