For AI agents: a documentation index is available at https://www.mongodb.com/ko-kr/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
See how MongoDB 9.0 delivers up to 2x higher throughput.
MongoDB Branding Shape
Register now >
Docs Menu

Document Structure Use Cases

In addition to defining data records, MongoDB uses the document structure throughout, including but not limited to: query filters, update specifications documents, and index specification documents

Query filter documents specify the conditions that determine which records to select for read, update, and delete operations.

You can use <field>:<value> expressions to specify the equality condition and query operator expressions.

{
<field1>: <value1>,
<field2>: { <operator>: <value> },
...
}

For examples, see:

Update specification documents use update operators to specify the data modifications to perform on specific fields during an update operation.

{
<operator1>: { <field1>: <value1>, ... },
<operator2>: { <field2>: <value2>, ... },
...
}

For examples, see Update specifications.

Index specification documents define the field to index and the index type:

{ <field1>: <type1>, <field2>: <type2>, ... }