Class Group

  • All Implemented Interfaces:
    com.yahoo.component.provider.Freezable, com.yahoo.component.provider.ListenableFreezable, com.yahoo.processing.response.Data, com.yahoo.processing.response.DataList<Hit>, java.lang.Cloneable, java.lang.Comparable<Hit>, java.lang.Iterable<Hit>
    Direct Known Subclasses:
    RootGroup

    public class Group
    extends HitGroup
    This class represents a single group in the grouping result model. A group may contain any number of results (stored as fields, use Hit.getField(String) to access), GroupList and HitList. Use the GroupingRequest.getResultGroup(com.yahoo.search.Result) to retrieve an instance of this.
    Author:
    Simon Thoresen Hult
    • Constructor Detail

      • Group

        public Group​(GroupId groupId,
                     Relevance rel)
        Creates a new instance of this class.
        Parameters:
        groupId - The id to assign to this group.
        rel - The relevance of this group.
    • Method Detail

      • getGroupId

        public GroupId getGroupId()
        Returns the id of this group. This is a model of the otherwise flattened hit id.
        Returns:
        The group id.
      • getHitList

        public HitList getHitList​(java.lang.String label)
        Returns the HitList with the given label. The label is the one given to the EachOperation that generated the list. This method returns null if no such list was found.
        Parameters:
        label - The label of the list to return.
        Returns:
        The requested list, or null.
      • getGroupList

        public GroupList getGroupList​(java.lang.String label)
        Returns the GroupList with the given label. The label is the one given to the EachOperation that generated the list. This method returns null if no such list was found.
        Parameters:
        label - The label of the list to return.
        Returns:
        The requested list, or null.