Mingo Documentation

Documents

Mingo's documents browser is the most convenient way to browse, view and work with MongoDB documents.

Querying

To find and view documents, Mingo let's you define a query and a sorting object. Skip and limit are replaced with pagination. Projection is also omited to prevent confusion by showing the documents as they are. Also, Mingo handles huge documents easily.

The query editor has many hidden features you should know about.

General features

  • Query history - is available by clicking on the "Query" label on the left of the query input. 
  • Sort history - is available by clicking on the "Sort" label on the left of the sort input. By default, Mingo provides options to sort by indexes.
  • Auto suggestions - Mingo analyzes the structure of the documents in each collection and will suggest field names, functions and even values in some cases. 
  • Format query - this button in the top right of the query editor will format (and indent) the current query.
  • Reset query - the X button in the top right will reset the query and sorting. By default, this means empty query and no sorting. However, if you have saved a default query for the collection, it will default to it.
  • Submit / Refresh - the query can be submitted by ⌘Enter or just Enter, depending on your settings. To refresh the documents' list, just press ⌘R
  • Saving queries - you can either create a saved named query or save the current query as the default (both query and sorting) for the collection. Anytime you open a new tab with this collection, the default query will be used.
Automatic quotes in queries
Mingo will automatically correct your missing quotes in queries. Submitting { user.lastName: "Pear"} will be automatically corrected to { "user.lastName": "Pear"}.

Dates in queries

Mingo supports human-readable shorthands for dates in queries. Compare the following two queries:

{
  "createAt": {
    "$gte": ISODate("2020-02-21T00:00:00Z"), // or new Date(…)
    "$lt": ISODate("2020-02-28T00:00:00Z") // or new Date(…)
  }
}
{
  "createdAt": #lastWeek
}

There are two main types of date shorthands available: 

  • Durations - (prefixed with #) represent periods between two moments.
    For example: {"createdAt": #lastWeek} will search for documents where createdAt is between the beginning and end of last week.
  • Moments - (prefixed with @) represent a single exact moments.
    For example: {"createdAt": @2021-11-22} will search for documents where createdAt is EXACTLY the moment of the start of that day.
Duration shorthands
#todaysince the start of the today
#yesterdayduring yesterday
#tomorrowduring tomorrow
#thisWeekduring the current week
#thisMonthduring the current month
#thisYearduring the current year
#lastWeekduring the previous week
#lastMonthduring the previous month
#lastYearduring the previous year
#lastYearduring the previous year
#last{number}{period}
#last2days, #last14weeks, #last3years
During the last {number} {period}. Use any number and one of the following periods: minutes, hours, days, weeks, months, years. This is case insesitive, so you may use #last4Years.
#next{number}{period}
#next2days, #next14weeks, #next3years
During the next {number} {period}. Use any number and one of the following periods: minutes, hours, days, weeks, months, years. This is case insesitive, so you may use #next4Years.
#2021-11-22during any specific date
#2021-11during any specific month
#2021during any specific year
#2021-11-22:2021-11-25between two dates, inclusive
#2021-11:2021-12between two months, inclusive
#2021-2022between two years, inclusive
#since2017-10-03since any specific date
#before2017-10-03before any specific date
Moment shorthands

@2020-01-29T17:29:50+00:00ISO 8601 format, or any part of it, such as @2020-01-29, @2020-01-29T17:29, etc. These represent a specific moment, so the documents have to match exact moment.

Smart (quick) searches

Indexed fields can be searched swiftly by using the value as query. 

So instead of providing an object as a query, such as {city: 'Amsterdam'}, you can simply use Amsterdam as the query. Mingo will try to find the phrase "Amsterdam" in ALL the indexed fields.

You can even use regular expressions as quick queries, such as /amsterdam/i.

Regular expressions in queries

Mingo supports querying by regular expressions. For example: {firstName: /david/i}.

You can even use regular expressions as quick queries, such as /david/i.

Paste & Go

This is a great feature, especially combined with Quick Search. Pressing ⌘G will paste the current clipboard value into the query field and submit it. The pasted value could be a regular query or just a phrase or _id copied from your admin or other app.

Browsing

Mingo shows 50 documents per page. Click a document to view its content. Click on any field to expand its subdocuments. ⌘+click will expand the document (or field) recursively.

Table columns

When a collection is opened for the first time, Mingo will try to pick a few fields to show as columns by default. Any changes you make to them will be saved as defaults for the collection. 

  • Adding columns - add more columns to view by clicking at the + sign in the column headers row. You may also pin any field or even nested field by right-clicking at the field and selecting "Pin as new column".
  • Removing columns - click the column header and select Unpin.
  • Sorting by columns - click the column header and select the sorting option you need.
  • Aligning columns - click the column header and select the alignment icon.
  • Resizing columns - click the column header and select the icon for minimum, optimum or maximum column width. You may also use the "resize handle" icon in column header and drag it to resize.
  • Reorganizing columns - Drag the column header to reorganize them.
  • Formatting columns - Select the "Customize" option on the colum header to set conditional formatting and much more (*experimental feature).

Manipulating

Document actions

Right-click any document to get a list of options and actions for that document.

Working with multiple documents

Mingo supports actions upon multiple selected documents. 

  • Select all documents - click the checkbox in the table header or press ⌘A. Press it again to toggle. Selecting "all documents" means selecting all documents in the collection, even those not currently listed.
  • Selecting individual documents - just hover a document and click space to toggle its selection. Shift+click will select a range of documents. You can even select multiple ranges.

Field actions

Right-click any field to get a list of options and actions for that field.

  • Edit field value - double-click a field or hover it and press E to edit the value.
  • Foreign keys - if the field's value looks like an _id, Mingo will let you find the document in the database with one click. The found document will be opened in a new tab. How cool is that? 🙂 
  • Long values - if the field's value is too long, Mingo will truncate it and let you view the entire value by clicking at it. 
  • Urls - if the field's value resembles a URL, Mingo will make it a link and open it in your default browser.. 

Undo

UNDO is available to reverse changes done by insert, update or remove operations. Press ⌘Z to open the list of recent changes to documents. You may then select the action to UNDO.