org.apache.solr.client.solrj.response

## Class QueryResponse

- java.lang.Object
- - org.apache.solr.client.solrj.SolrResponse
  - - org.apache.solr.client.solrj.response.SolrResponseBase
    - - org.apache.solr.client.solrj.response.QueryResponse

All Implemented Interfaces:
  Serializable

    public class QueryResponse
    extends SolrResponseBase

Since:
  solr 1.3
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`QueryResponse()`
`QueryResponse(NamedList<Object> res, SolrServer solrServer)` Utility constructor to set the solrServer and namedList

### Method Summary

Methods
`<T> List<T>` `getBeans(Class<T> type)`
`Map<String,Object>` `getDebugMap()`
`Map<String,SolrDocumentList>` `getExpandedResults()`
`Map<String,String>` `getExplainMap()`
`FacetField` `getFacetDate(String name)`
`List<FacetField>` `getFacetDates()`
`FacetField` `getFacetField(String name)` get
`List<FacetField>` `getFacetFields()` See also: `getLimitingFacets()`
`NamedList<List<PivotField>>` `getFacetPivot()`
`Map<String,Integer>` `getFacetQuery()`
`List<RangeFacet>` `getFacetRanges()`
`Map<String,FieldStatsInfo>` `getFieldStatsInfo()`
`GroupResponse` `getGroupResponse()` Returns the `GroupResponse` containing the group commands.
`NamedList<Object>` `getHeader()`
`Map<String,Map<String,List<String>>>` `getHighlighting()`
`List<FacetField>` `getLimitingFacets()`
`String` `getNextCursorMark()`
`SolrDocumentList` `getResults()`
`NamedList<ArrayList>` `getSortValues()`
`SpellCheckResponse` `getSpellCheckResponse()`
`TermsResponse` `getTermsResponse()`
`protected List<PivotField>` `readPivots(List<NamedList> list)`
`void` `removeFacets()` Remove the field facet info
`void` `setResponse(NamedList<Object> res)`

### Methods inherited from class org.apache.solr.client.solrj.response.SolrResponseBase

`getElapsedTime, getQTime, getRequestUrl, getResponse, getResponseHeader, getStatus, setElapsedTime, setRequestUrl, toString`

### Methods inherited from class org.apache.solr.client.solrj.SolrResponse

`deserialize, serializable`

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

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

### Constructor Detail

#### QueryResponse

    public QueryResponse()

#### QueryResponse

    public QueryResponse(NamedList<Object> res,
                 SolrServer solrServer)

Utility constructor to set the solrServer and namedList

### Method Detail

#### setResponse

    public void setResponse(NamedList<Object> res)

Overrides:
  `setResponse` in class `SolrResponseBase`

#### readPivots

    protected List<PivotField> readPivots(List<NamedList> list)

#### removeFacets

    public void removeFacets()

Remove the field facet info

#### getHeader

    public NamedList<Object> getHeader()

#### getResults

    public SolrDocumentList getResults()

#### getSortValues

    public NamedList<ArrayList> getSortValues()

#### getDebugMap

    public Map<String,Object> getDebugMap()

#### getExplainMap

    public Map<String,String> getExplainMap()

#### getFacetQuery

    public Map<String,Integer> getFacetQuery()

#### getExpandedResults

    public Map<String,SolrDocumentList> getExpandedResults()

#### getGroupResponse

    public GroupResponse getGroupResponse()

Returns the `GroupResponse` containing the group commands. A group command can be the result of one of the following parameters:

- group.field
- group.func
- group.query

Returns:
  the `GroupResponse` containing the group commands

#### getHighlighting

    public Map<String,Map<String,List<String>>> getHighlighting()

#### getSpellCheckResponse

    public SpellCheckResponse getSpellCheckResponse()

#### getTermsResponse

    public TermsResponse getTermsResponse()

#### getFacetFields

    public List<FacetField> getFacetFields()

See also: `getLimitingFacets()`

#### getFacetDates

    public List<FacetField> getFacetDates()

#### getFacetRanges

    public List<RangeFacet> getFacetRanges()

#### getFacetPivot

    public NamedList<List<PivotField>> getFacetPivot()

#### getFacetField

    public FacetField getFacetField(String name)

get

Parameters:
  `name` - the name of the
Returns:
  the FacetField by name or null if it does not exist

#### getFacetDate

    public FacetField getFacetDate(String name)

#### getLimitingFacets

    public List<FacetField> getLimitingFacets()

Returns:
  a list of FacetFields where the count is less then then #getResults() `SolrDocumentList.getNumFound()` If you want all results exactly as returned by solr, use: `getFacetFields()`

#### getBeans

    public <T> List<T> getBeans(Class<T> type)

#### getFieldStatsInfo

    public Map<String,FieldStatsInfo> getFieldStatsInfo()

#### getNextCursorMark

    public String getNextCursorMark()