Skip to content

Commit 8cb9cf8

Browse files
authored
docs(databases): MongoDB search matches every field type (#123)
1 parent 1cc7209 commit 8cb9cf8

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎connections/urls.mdx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ mongodb://user:pass@host:27017/mydb?authSource=admin
225225
mongodb://user:pass@host1:27017,host2:27017,host3:27017/mydb?replicaSet=rs0
226226
```
227227

228+
- `uuidRepresentation` sets **Legacy UUID Encoding**.
229+
- **Copy Connection String** writes an SRV connection as `mongodb+srv://` with no port, and every option percent-encoded.
230+
228231
## What the path component means
229232

230233
The part after the host is the database name on most schemes. Seven read it differently:

‎databases/mongodb.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ A field whose own name contains a dot, starts with `$` or is `__proto__` is writ
8787

8888
The filter bar's column picker lists paths inside nested objects and arrays of objects, so `customer.country` and `items.sku` filter directly; a row on an array field chooses **any element** or **same element**, which makes one array entry satisfy every row set to it. See [Filtering](/features/filtering#nested-fields). A field name containing a literal dot is left out of the picker, since MongoDB reads a dot as a path separator; reach it with `$getField` inside `$expr`.
8989

90+
On MongoDB 4.2 or later, **Search All Rows** and a **contains**, **starts with** or **ends with** row also match a number, a date, a boolean or an ObjectId by the text the grid shows, so `2024-01-02` finds a date and `42` an integer. An array matches through its strings; search a nested document through its paths in the filter bar. A raw filter row that is not one whole filter document matches no documents.
91+
92+
Rows a query tab returns are read only, whatever the statement. Edit a document from its collection's tab.
93+
9094
The Structure tab lists a collection's indexes, and [renames or removes a field](#renaming-and-removing-fields) across the whole collection. Drop an index from a query tab with `db.users.dropIndex("email_1")`. **New Database** asks for a database name and a first collection, both required. **New View** opens a query tab holding a `db.createView("view_name", "source_collection", [pipeline])` template, and editing a view pre-fills `db.runCommand({"collMod": …})`.
9195

9296
### Views

0 commit comments

Comments
 (0)