Book Image

Practical MongoDB Aggregations

By : Paul Done
Book Image

Practical MongoDB Aggregations

By: Paul Done

Overview of this book

Officially endorsed by MongoDB, Inc., Practical MongoDB Aggregations helps you unlock the full potential of the MongoDB aggregation framework, including the latest features of MongoDB 7.0. This book provides practical, easy-to-digest principles and approaches for increasing your effectiveness in developing aggregation pipelines, supported by examples for building pipelines to solve complex data manipulation and analytical tasks. This book is customized for developers, architects, data analysts, data engineers, and data scientists with some familiarity with the aggregation framework. It begins by explaining the framework's architecture and then shows you how to build pipelines optimized for productivity and scale. Given the critical role arrays play in MongoDB's document model, the book delves into best practices for optimally manipulating arrays. The latter part of the book equips you with examples to solve common data processing challenges so you can apply the lessons you've learned to practical situations. By the end of this MongoDB book, you’ll have learned how to utilize the MongoDB aggregation framework to streamline your data analysis and manipulation processes effectively.
Table of Contents (20 chapters)
2
Part 1: Guiding Tips and Principles
7
Part 2: Aggregations by Example
16
Afterword

Create an Atlas Search index

To complete the examples in Chapter 13, Full-Text Search Examples, you need to use a MongoDB Atlas cluster rather than a self-managed MongoDB deployment. The simplest way to provision an Atlas cluster is to create a free-tier cluster (see ). Once created, you can use the following steps to create a search index:

  1. First, in the Atlas (see ) console, for your database cluster, click the Search tab and then click Create Search Index:
  1. Select JSON Editor and then click Next:
  1. Leave Index Name as default, select the Database and Collection you require, paste in your JSON index definition, and then click Next:
  1. On the review screen, click Create Search Index to finish:
  1. It may take a few minutes for the system to generate the text search index.

Note...