• public class Group
    extends Stage
    Groups input documents by the specified _id expression and for each distinct grouping, outputs a document.
    • Constructor Detail

      • Group

        protected Group()
    • Method Detail

      • of

        public static Group of()
        Creates a group stage with no ID definition
        Returns:
        the new stage
      • of

        public static Group of​(Group.GroupId id)
        Creates a group stage with an ID definition
        Parameters:
        id - the group ID
        Returns:
        the new stage
      • id

        public static Group.GroupId id​(String name)
        Creates a named group ID
        Parameters:
        name - the id name
        Returns:
        the new groupID
      • id

        public static Group.GroupId id​(Expression name)
        Creates a named group ID
        Parameters:
        name - the id name
        Returns:
        the new groupID
      • id

        public static Group.GroupId id()
        Creates an unnamed group ID
        Returns:
        the new groupID
      • field

        public Group field​(String name,
                           Expression expression)
        Adds a named field to the group with an expression giving the value.
        Parameters:
        name - the name of the field
        expression - the expression giving the value
        Returns:
        this
      • getFields

        public Fields<Group> getFields()
        Returns:
        the fields
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • getId

        public Group.GroupId getId()
        Returns:
        the ID
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.