Aggregation framework operators

The MongoDB aggregation framework operators that are supported by HCL OneDB™ are sorted into logical areas.

You can use aggregation framework operators to aggregate and manipulate documents as they move through the aggregation pipeline stages. You can use some operators to aggregate or slice time series data.

Pipeline operators

Table 1. Pipeline operators
MongoDB command JSON collections Relational tables Details
$geoNear Yes No
  • Supported by using the GeoJSON format. The MongoDB legacy coordinate pairs are not supported.
  • You cannot use dot notation for the distanceField and includeLocs parameters.
$group Yes Yes

For the syntax to aggregate time series data, see Aggregate or slice time series data.

$limit Yes Yes
$match Yes Yes
$out Yes Yes
$project Partial Partial
  • You can use $project to include fields from the original document, for example { $project : { title : 1 , author : 1 }}.
  • You cannot use $project to insert computed fields, rename fields, or create and populate fields that hold subdocuments.
  • Projection operators are not supported.
  • You can use the $slice operator to return part of a time series. For the syntax to slice time series data, see Aggregate or slice time series data.
$redact No No
$skip Yes Yes
$sort Yes Yes
$unwind Yes No

Expression operators

$group operators
Table 2. $group operators
Command JSON collections Relational tables Time series tables Details
$addToSet Yes No No
$avg Yes Yes Yes
$first Yes Yes Yes
$last Yes Yes Yes
$max Yes Yes Yes
$median No No Yes An HCL OneDB JSON operator for aggregating time series data. For the syntax to aggregate time series data, see Aggregate or slice time series data.
$min Yes Yes Yes
$nth No No Yes An HCL OneDB JSON operator for aggregating time series data. For the syntax to aggregate time series data, see Aggregate or slice time series data.
$push Yes No No
$sum Yes Yes Yes

For more information about the MongoDB features, see http://docs.mongodb.org/manual/reference/.