Creates an $accumulator pipeline stage
Creates an $accumulator pipeline stage
the field name
a function used to initialize the state
init function’s arguments (may be null)
a function used to accumulate documents
additional accumulate function’s arguments (may be null). The first argument to the function is ‘state’.
a function used to merge two internal states, e.g. accumulated on different shards or threads. It returns the resulting state of the accumulator.
a function used to finalize the state and return the result (may be null)
a language specifier
the $accumulator pipeline stage
1.2
Requires MongoDB 4.4 or greater
Creates an $accumulator pipeline stage
Creates an $accumulator pipeline stage
the field name
a function used to initialize the state
init function’s arguments (may be null)
a function used to accumulate documents
additional accumulate function’s arguments (may be null). The first argument to the function is ‘state’.
a function used to merge two internal states, e.g. accumulated on different shards or threads. It returns the resulting state of the accumulator.
a function used to finalize the state and return the result (may be null)
the $accumulator pipeline stage
1.2
Requires MongoDB 4.4 or greater
Creates an $accumulator pipeline stage
Creates an $accumulator pipeline stage
the field name
a function used to initialize the state
a function used to accumulate documents
a function used to merge two internal states, e.g. accumulated on different shards or threads. It returns the resulting state of the accumulator.
a function used to finalize the state and return the result (may be null)
the $accumulator pipeline stage
1.2
Requires MongoDB 4.4 or greater
Creates an $accumulator pipeline stage
Creates an $accumulator pipeline stage
the field name
a function used to initialize the state
a function used to accumulate documents
a function used to merge two internal states, e.g. accumulated on different shards or threads. It returns the resulting state of the accumulator.
the $accumulator pipeline stage
1.2
Requires MongoDB 4.4 or greater
Gets a field name for a $group
operation representing all unique values that results from applying the given expression to each
document in a group of documents that share the same group by key.
Gets a field name for a $group
operation representing all unique values that results from applying the given expression to each
document in a group of documents that share the same group by key.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the average of the values of the given expression when applied to all
members of the group.
Gets a field name for a $group
operation representing the average of the values of the given expression when applied to all
members of the group.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the value of the given expression when applied to the first member of
the group.
Gets a field name for a $group
operation representing the value of the given expression when applied to the first member of
the group.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the value of the given expression when applied to the last member of
the group.
Gets a field name for a $group
operation representing the value of the given expression when applied to the last member of
the group.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the maximum of the values of the given expression when applied to all
members of the group.
Gets a field name for a $group
operation representing the maximum of the values of the given expression when applied to all
members of the group.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the minimum of the values of the given expression when applied to all
members of the group.
Gets a field name for a $group
operation representing the minimum of the values of the given expression when applied to all
members of the group.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing an array of all values that results from applying an expression to each
document in a group of documents that share the same group by key.
Gets a field name for a $group
operation representing an array of all values that results from applying an expression to each
document in a group of documents that share the same group by key.
the expression type
the field name
the expression
the field
Gets a field name for a $group
operation representing the sample standard deviation of the values of the given expression
when applied to all members of the group.
Gets a field name for a $group
operation representing the sample standard deviation of the values of the given expression
when applied to all members of the group.
Use if the values encompass the entire population of data you want to represent and do not wish to generalize about a larger population.
the expression type
the field name
the expression
the field
1.1
Requires MongoDB 3.2 or greater
Gets a field name for a $group
operation representing the sample standard deviation of the values of the given expression
when applied to all members of the group.
Gets a field name for a $group
operation representing the sample standard deviation of the values of the given expression
when applied to all members of the group.
Use if the values encompass a sample of a population of data from which to generalize about the population.
the expression type
the field name
the expression
the field
1.1
Requires MongoDB 3.2 or greater
Gets a field name for a $group
operation representing the sum of the values of the given expression when applied to all members of
the group.
Gets a field name for a $group
operation representing the sum of the values of the given expression when applied to all members of
the group.
the expression type
the field name
the expression
the field
(Since version ) see corresponding Javadoc for more information.
Builders for accumulators used in the group pipeline stage of an aggregation pipeline.
1.0
Expressions
Accumulators
Aggregation pipeline