Everyday workflows
Querying documents
Use Source, Visual and Chips filters, BSON values, server sorting, projection and paging.
Choose a filter mode
Query tabs provide three views of a MongoDB filter:
- Source accepts a BSON object expression. Use it for complex filters or expressions that visual controls cannot represent.
- Visual builds conditions and groups using controls for fields, operators and values.
- Chips presents conditions as compact, editable chips.
Choose available modes and the default for new editors under Settings → Queries. If a filter cannot be converted, keep it in Source and correct it there. Switching modes does not run the query.
Write a filter
The Source editor takes the filter object, not a complete db.collection.find(...) command. An empty object {} matches all documents. Use your actual field names in these examples.
Equality and numeric comparisons
{ status: "pending", total: { $gte: 100 } }
Multiple alternatives
{ $or: [{ status: "pending" }, { priority: "high" }] }
Nested fields and regular expressions
{ "customer.address.city": "London", name: /^Acme/i }
Dates and typed identifiers
Filter a date using an explicit timezone:
{ createdAt: { $gte: ISODate("2026-01-01T00:00:00Z") } }
Find an ObjectId:
{ _id: ObjectId("507f1f77bcf86cd799439011") }
Match a standard UUID:
{ customerId: UUID("00112233-4455-6677-8899-aabbccddeeff") }
Match an exact 64-bit integer beyond JavaScript's safe integer range:
{ sequence: Long("9007199254740993") }
Constructor syntax preserves BSON types. A string containing an ID is different from an ObjectId or UUID. For legacy .NET GUID storage, use CSUUID("..."); it is not interchangeable with UUID("...").
Palryn parses a constrained BSON syntax; it does not evaluate arbitrary JavaScript in query fields. Use Shell when you need a full script.
Sort and select fields on the server
Server sort orders matching documents before paging. Use 1 for ascending or -1 for descending:
{ createdAt: -1, _id: 1 }
Server projection chooses fields returned by MongoDB:
{ customerId: 1, status: 1, total: 1 }
Use inclusion or exclusion flags, with MongoDB's usual _id exception; this editor does not support arbitrary projection expressions. An empty projection {} returns complete documents.
Projection versus columns: hiding a table column only changes the display. Server projection removes fields from the returned document. Use an empty projection and rerun before editing, deleting or duplicating a full document.
Run, stop and page
Choose Run query or press Ctrl/Command + Enter in the editor. Page size controls the requested number of rows on each page. First, Previous, Next and Last move through matches when those actions are available.
Palryn also applies a result-size budget from Settings → Queries. A page can stop at that budget before reaching its requested row count. The notice explains why loading stopped; reduce fields with a projection, narrow your query, or move to the next page.
Stop ends the current loading session. Results already displayed remain available. If a session expires or the connection changes, rerun the query for fresh results. Query results are not a transactionally frozen snapshot of a collection that other clients are modifying.
Autocomplete and result shortcuts
Suggestions include operators, BSON helpers and field names sampled from loaded documents. Press Ctrl/Command + Space to request suggestions, use the arrow keys to select, and Tab to accept. Missing suggestions do not mean a field is absent from the collection.
Right-click a result property to add a matching or excluding filter condition when available. The value's BSON type is retained. Review the resulting filter and run it explicitly.
Export a query
The Export query results… action uses the last executed filter, sort and projection. It exports all matching server documents, not just the current page. Unsaved local document edits are not included. See Export documents for formats and file handling.