Class Group

java.lang.Object
com.yahoo.component.provider.FreezableClass
com.yahoo.component.provider.ListenableFreezableClass
com.yahoo.search.result.Hit
com.yahoo.search.result.HitGroup
com.yahoo.search.grouping.result.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>, Cloneable, Comparable<Hit>, Iterable<Hit>
Direct Known Subclasses:
RootGroup

public class Group extends HitGroup
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 Details

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

    • getGroupId

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

      public HitList getHitList(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(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