liveBook · Manning

Mongot

As explained in MongoDB 8.0 in Action, Third Edition

mongot is the MongoDB process that maintains Atlas Search indexes, tracks database changes, and processes Atlas Search queries alongside mongod.

mongot is the search process that runs alongside MongoDB’s database process, mongod. It builds Atlas Search indexes from collection index definitions, follows change streams to update those indexes, and handles search queries. It connects MongoDB to Apache Lucene without requiring a separate search system. section 11.3.1 section 11.8

Figure 11.3 The Atlas Search architecture integrates MongoDB with the Lucene Search Index managed by the mongot process. MongoDB (mongod) serves as the primary database, sending object IDs and metadata to mongot via change streams for synchronization and monitoring. mongot uses APIs for index configuration and search operations. The Lucene component handles search indexes and ObjectIDs, enabling efficient query processing. Index configuration is managed through MongoDB Atlas Automation, interfacing with the Atlas UI, API, and CLI. Search queries initiated via mongosh, Compass, or drivers are processed by the Atlas Search cluster. (Image © MongoDB 2024 CC BY-NC-SA 3.0)

Follow the path from mongod through change streams to the Lucene index managed by mongot, then the path used to process a search query. section 11.3.1

Choose where mongot runs according to the workload:

  • On dedicated Atlas Search Nodes, mongot runs separately from mongod so search work does not compete with database operations. These nodes are available for dedicated M10-or-higher sharded and unsharded clusters; allow 20% local SSD storage overhead for index operations. section 11.3.2
  • For Atlas Vector Search, dedicated search nodes also separate mongot from mongod. Parallel query execution can lower latency on large data sets, at the cost of more resources. section 12.6
  • In an Atlas CLI local deployment, mongot runs as a separate component alongside mongod and supplies full-text and vector search for development. section 13.1

Inspect and test a local mongot

After starting a local deployment, use `docker ps` to find its container, then `docker exec -it <container_id> /bin/bash` and `cd /opt/mongot/` to inspect its files. In mongosh, create a search index with `db.collection.createSearchIndex()`, verify it with `getSearchIndexes()`, and remove it with `db.collection.dropSearchIndex(<name>)`. The local mongot binary described here is a private preview for testing, not production use. section 13.4.2 section 13.6

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains process responsibilities, node placement, and local configuration, but stops short of mongot’s internal query algorithms.
Examples
Uses local Docker container inspection and mongosh search-index creation, verification, and deletion.
What it assumes
Assumes familiarity with MongoDB collections and shell commands while introducing the relationship between mongod, mongot, and Lucene.
What you can do after
Operate/configure it in a local deployment and manage its search indexes, while avoiding production use of the private-preview binary.
How it connects
Connects Apache Lucene, MongoDB change streams, Atlas Search Nodes, and Atlas Vector Search.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.