Advanced Document Store Querying
Operators and patterns for filtering, updating, and modifying documents in your Cloud Function's Document Store.
The Document Store is built on MongoDB, so its query and update operators follow MongoDB syntax. This page lists the operators you can use and that IXON supports; for full semantics and examples beyond what's covered here, the MongoDB operator reference applies.
If you're new to the Document Store, start with Document Store.
Select operators
Use these operators to find and filter documents and subdocuments.
| Name | Description |
|---|---|
$and | Logical AND across query clauses. |
$not | Inverts a query expression. |
$nor | Returns documents that fail to match either clause. |
$or | Logical OR across query clauses. |
$exists | Matches documents that have the specified field. |
$type | Matches documents where a field is of the specified type. |
$all | Matches arrays containing all specified elements. |
$elemMatch | Matches documents where an array element matches the inner conditions. |
$size | Matches arrays of a given size. |
Update operators
Field operators
| Name | Description |
|---|---|
$currentDate | Sets a field to the current date. |
$inc | Increments a field. |
$min | Updates only if the new value is less than the current. |
$max | Updates only if the new value is greater than the current. |
$mul | Multiplies a field. |
$rename | Renames a field. |
$set | Sets a field's value. |
$setOnInsert | Sets a field only on insert (no effect on plain updates). |
$unset | Removes a field. |
Array operators
| Name | Description |
|---|---|
$ | Placeholder for the first matching array element. |
$[] | Placeholder for all elements in an array. |
$[<identifier>] | Placeholder for elements matching arrayFilters. |
$addToSet | Adds elements to an array if not already present. |
$pop | Removes the first or last array item. |
$pull | Removes array elements matching a query. |
$push | Appends an item to an array. |
$pullAll | Removes all matching values from an array. |
Modifier operators
| Name | Description |
|---|---|
$each | Modifies $push and $addToSet to append multiple items. |
$position | Specifies position for $push. |
$slice | Limits the size of arrays after $push. |
$sort | Reorders array elements after $push. |
Updated about 12 hours ago
