Class Group


  • public class Group
    extends Object
    • Constructor Detail

      • Group

        public Group()
    • Method Detail

      • getField

        public String getField()
        Field name to group results on.
        Returns:
        The field
      • getSize

        public Integer getSize()
        Number of results to be included in the _group key of the returned document. Can be between 1 and 10. Defaults to 10.
        Returns:
        the size
      • getSort

        public Sort getSort()
        A JSON object containing the field name or _score as the key and the value as asc or desc. The default sort is by descending relevance.
        Returns:
        the sort
      • getCollapse

        public Boolean getCollapse()
        Experimental. Provides Paging and Sorting support. The field you are grouping on must not have multiple values. Multiple values will cause an error.
        Returns:
        collapse is enabled
      • setField

        public Group setField​(String field)
        Field name to group results on.
        Parameters:
        field - Field name to group results on.
        Returns:
        this.
      • setSize

        public Group setSize​(Integer size)
        Number of results to be included in the _group key of the returned document. Can be between 1 and 10. Defaults to 10.
        Parameters:
        size - number of results to be included in the _group key
        Returns:
        this.
      • setSort

        public Group setSort​(Sort sort)
        A JSON object containing the field name or _score as the key and the value as asc or desc. The default sort is by descending relevance.
        Parameters:
        sort - a sort field
        Returns:
        this.
      • setCollapse

        public Group setCollapse​(Boolean collapse)
        Experimental. Provides Paging and Sorting support. The field you are grouping on must not have multiple values. Multiple values will cause an error.
        Parameters:
        collapse - Whether to enable paging and sorting
        Returns:
        this.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object