Class AggregationPipeline

java.lang.Object
org.restheart.mongodb.handlers.aggregation.AbstractAggregationOperation
org.restheart.mongodb.handlers.aggregation.AggregationPipeline

public class AggregationPipeline extends AbstractAggregationOperation
represents a map reduce.
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Field Details

  • Constructor Details

    • AggregationPipeline

      public AggregationPipeline(org.bson.BsonDocument properties) throws InvalidMetadataException
      Parameters:
      properties - the json properties object. It must include the following properties:
      • stages
      Note that the dollar prefixed operators in the stages must be underscore escaped, e.g. "_$exits"

      Example: aggrs: [ { "type":"pipeline", "uri":"test_ap", "allowDiskUse": false, "stages": [ {"_$match": { "name": { "_$exists": true}}}, {"_$group": { "_id": "$name", "avg_age": {"_$avg": "$age"} }} ] }]

      Throws:
      InvalidMetadataException
  • Method Details