Package org.apache.solr.client.solrj.response

# Class Group

java.lang.Object
org.apache.solr.client.solrj.response.Group

All Implemented Interfaces:
  `Serializable`

public class Group extends Object implements Serializable
Represents a group. A group contains a common group value that all documents inside the group share and documents that belong to this group.

A group value can be a field value, function result or a query string depending on the `GroupCommand`. In case of a field value or a function result the value is always an indexed value.

Since:
  solr 3.4
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`Group(String groupValue, SolrDocumentList result)`
Creates a Group instance.

## Method Summary

Modifier and Type
Method
Description
`String`
`getGroupValue()`
Returns the common group value that all documents share inside this group.
`SolrDocumentList`
`getResult()`
Returns the documents to be displayed that belong to this group.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Group

public Group(String groupValue, SolrDocumentList result)
Creates a Group instance.

Parameters:
  `groupValue` - The common group value (indexed value) that all documents share.
  `result` - The documents to be displayed that belong to this group

## Method Details

### getGroupValue

public String getGroupValue()
Returns the common group value that all documents share inside this group. This is an indexed value, not a stored value.

Returns:
  the common group value

### getResult

public SolrDocumentList getResult()
Returns the documents to be displayed that belong to this group. How many documents are returned depend on the `group.offset` and `group.limit` parameters.

Returns:
  the documents to be displayed that belong to this group