MongoDB Query Language (MQL) Miscellaneous Operators
$comment
Adds a comment to a query without affecting the query execution, useful for documentation and debugging purposes.
$getField
Returns the value of a specified field from a document, with support for dynamically determined field names using expressions and variables.
$natural
Controls the order in which documents are returned by specifying natural order (insertion order) or reverse natural order.
$rand
Returns a random floating-point number between 0 and 1, useful for random sampling and generating random values in aggregation pipelines.
$sampleRate
Randomly selects documents from the input at the specified rate, useful for sampling large datasets or creating representative subsets for analysis.