Query operators can be used to construct query conditions in order to find data. Query operators are typically applied to a property and take a value or a document defining the conditions of the operation.
For example:
{<property>: {<operator>: value}}
Or:
{<property>: {<operator>: {<option>: <value>, <option>: value, ...}}}
Or, in the case of logical operators (e.g. $and
, $or
), the operator takes an array of expressions:
{<operator>: [{<expression>}, {<expression>}, ...]}
Usage
Query operators can be used in a where
query argument or in a $match
pipeline stage .
When used in a where
query argument, the request looks similar to the following:
GET /<object>?where={<query conditions>}
When used in a $match
pipeline stage, the request looks similar to the following:
GET /<object>?pipeline=[{"$match":{<query conditions>}}]
Query Operator Types
Type | Description |
---|---|
For filtering results based on value comparisons. | |
Join query clauses together or invert the meaning of a query expression | |
Filter results based on the result of a regular expression | |
Find locations within a distance of a central location. | |
Match on arrays, elements in an array, or size of arrays. |