Class AggregationPipeline


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

      • 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 Detail

      • getStages

        public org.bson.BsonArray getStages()
        Returns:
        the stages
      • getAllowDiskUse

        public org.bson.BsonBoolean getAllowDiskUse()
        Returns:
        the allowDiskUse