Skip to content

Explorer

  • MongoDB

The explorer is the tree under a MongoDB connection in the side bar. It lists databases and, inside each, the collections, views, time series collections, GridFS buckets, users and roles. You open objects from it, list a database’s collections with their statistics in the Objects tab, start the tool panels, create collections and views, and drop objects.

Each database holds these folders:

Folder Contents
Collections Collections with their document count. Each has an Indexes folder with its indexes and their keys.
Views Views.
Time series Time series collections.
GridFS buckets Buckets with their file count.
Users The database’s users.
Roles The database’s roles.

system.* collections are left out of Collections, and so are a bucket’s .files and .chunks collections, which appear as the bucket instead. The tree reads no documents: counts and sizes come from listDatabases and $collStats, for the first 200 collections of a folder.

Double-click the connection to connect; its tree then unfolds. In the tree:

  • A click on a collection, view or time series collection opens it in the collection view, or brings it forward if it is open. A collection’s chevron expands it instead, to show its Indexes folder.
  • A click on a database, or on one of its folders, opens or folds it and lists what it holds in the Objects tab. Its chevron only opens or folds it.
  • Double-click a bucket, user, role or index, or select it and press Enter:
Node Opens
GridFS bucket The GridFS browser
User or role The users and roles editor
Index The index manager

Press Ctrl + P (Cmd + P on macOS), Go to Table or Collection…, to jump to a collection by a few letters of its name. It searches what the explorer has loaded, and the collections of the first eight databases of each connected MongoDB connection (admin, config and local left out). See Command palette.

A click on a database lists its collections in the Objects tab, one row per collection with its Documents, Size, Storage size, Index size and Indexes. A click on a folder, such as Views or GridFS buckets, lists that folder’s objects.

  • Select a column header to sort by it. The search box narrows the list by name.
  • A click selects a row; Ctrl or Cmd adds to the selection, and Shift extends it.
  • Double-click a row, or press Enter, to open it as the tree does: a collection’s documents, a bucket’s files.
  • Right-click a row for the same menu as in the tree.
  • The toolbar has Open, New collection and Refresh. The status bar shows the count and the selection.

See Objects view for the tab across engines.

Hover a node and open its Actions menu, or right-click the node.

Node Menu items
Database New SQL query, Create collection…, Create view…, Watch changes, Watch the whole deployment, Users and roles, Profiler…, Transfer data to…, Back up…, Restore…, Open console, Refresh, Drop database…
Collection, view or time series Open documents, Aggregate…, Query with SQL, Indexes, Analyse schema, Options, Maintenance…, Watch changes, Create view on it…, Transfer data to…, Open console, Refresh, Drop collection… or Drop view…
Collections folder Create collection…
Time series folder Create time series collection…
Views folder Create view…
Users or Roles folder Manage users or Manage roles
Indexes folder or an index Manage indexes; an index also has Drop index…
User or role Open in users and roles, Drop user… or Drop role…

Views have no Indexes, Maintenance… or Watch changes item. On a read-only profile the create, restore and drop items are not shown.

  1. Open the menu of a database or its Collections folder and choose Create collection…. You can also choose New collection in the Objects tab, or run Create Collection… from the command palette and pick the database.
  2. Enter a Name and pick a Kind: Plain, Capped, Time series or Clustered.
  3. Fill in the fields of that kind (see the table below), and optionally a Collation and a Validator with its Validation level and Validation action.
  4. Check the command shown under the form, choose Create…, then confirm with Create.
Kind Fields
Plain None.
Capped Size (bytes) and Most documents (optional).
Time series Time field, Meta field (optional), Granularity and Delete documents after (seconds, optional). Time series collections take no validator.
Clustered Delete documents after (seconds, optional). Clustered collections need MongoDB 5.3 or later.
  1. Choose Create view… on a database or the Views folder, or Create view on it… on a collection.
  2. Enter the View name and the Source collection or view.
  3. Build the Pipeline from stage cards, as in the aggregation editor.
  4. Check the createView command shown under the form, choose Create…, then confirm with Create.

Choose Drop database…, Drop collection…, Drop view…, Drop index…, Drop user… or Drop role… from the node’s menu. The confirmation shows the exact command it runs; choose Drop to run it.

Documents Querybara 0.1.1 · built frombc9f5aa