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
,MapSerializable
,MapWriter
,NavigableObject
public class QueryResponse extends SolrResponseBase
- Since:
- solr 1.3
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Constructor Summary
Constructors Constructor Description QueryResponse()
QueryResponse(SolrClient solrClient)
QueryResponse(NamedList<Object> res, SolrClient solrClient)
Utility constructor to set the solrServer and namedList
-
Method Summary
-
Methods inherited from class org.apache.solr.client.solrj.response.SolrResponseBase
getElapsedTime, getQTime, getRequestUrl, getResponse, getResponseHeader, getStatus, setElapsedTime, setRequestUrl, toString, writeMap
-
Methods inherited from class org.apache.solr.client.solrj.SolrResponse
deserialize, getException, serializable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
-
-
-
-
Constructor Detail
-
QueryResponse
public QueryResponse()
-
QueryResponse
public QueryResponse(NamedList<Object> res, SolrClient solrClient)
Utility constructor to set the solrServer and namedList
-
QueryResponse
public QueryResponse(SolrClient solrClient)
-
-
Method Detail
-
setResponse
public void setResponse(NamedList<Object> res)
- Overrides:
setResponse
in classSolrResponseBase
-
readPivots
protected List<PivotField> readPivots(List<NamedList> list)
-
removeFacets
public void removeFacets()
Remove the field facet info
-
getResults
public SolrDocumentList getResults()
-
getExpandedResults
public Map<String,SolrDocumentList> getExpandedResults()
- Returns:
- map with each group value as key and the expanded documents that belong to the group as value. There is no guarantee on the order of the keys obtained via an iterator.
-
getGroupResponse
public GroupResponse getGroupResponse()
Returns theGroupResponse
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
-
getSpellCheckResponse
public SpellCheckResponse getSpellCheckResponse()
-
getClusteringResponse
public ClusteringResponse getClusteringResponse()
-
getJsonFacetingResponse
public NestableJsonFacet getJsonFacetingResponse()
-
getSuggesterResponse
public SuggesterResponse getSuggesterResponse()
-
getTermsResponse
public TermsResponse getTermsResponse()
-
getMoreLikeThis
public NamedList<SolrDocumentList> getMoreLikeThis()
-
getCancellationInfo
public String getCancellationInfo()
-
getTaskStatusCheckInfo
public String getTaskStatusCheckInfo()
-
getFacetFields
public List<FacetField> getFacetFields()
See also:getLimitingFacets()
-
getFacetDates
public List<FacetField> getFacetDates()
-
getFacetRanges
public List<RangeFacet> getFacetRanges()
-
getFacetPivot
public NamedList<List<PivotField>> getFacetPivot()
-
getIntervalFacets
public List<IntervalFacet> getIntervalFacets()
-
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()
-
getFieldStatsInfo
public Map<String,FieldStatsInfo> getFieldStatsInfo()
-
getNextCursorMark
public String getNextCursorMark()
-
-