|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.request.SolrQueryResponse
public class SolrQueryResponse
SolrQueryResponse
is used by a query handler to return
the response to a query request.
Note On Returnable Data...
A SolrQueryResponse
may contain the following types of
Objects generated by the SolrRequestHandler
that processed
the request.
String
Integer
Long
Float
Double
Boolean
Date
DocList
Map
containing any of the items in this listNamedList
containing any of the items in this listCollection
containing any of the items in this list
Field Summary | |
---|---|
protected Set<String> |
defaultReturnFields
|
protected long |
endtime
The endtime of the request in milliseconds. |
protected Exception |
err
|
protected NamedList |
values
Container for user defined values |
Constructor Summary | |
---|---|
SolrQueryResponse()
|
Method Summary | |
---|---|
void |
add(String name,
Object val)
Appends a named value to the list of named values to be returned. |
long |
getEndTime()
Get the time in milliseconds when the response officially finished. |
Exception |
getException()
Returns an Exception if there was a fatal error in processing the request. |
Set<String> |
getReturnFields()
Gets the document field names of fields to return by default when returning DocLists |
NamedList |
getValues()
Gets data to be returned in this response |
void |
setAllValues(NamedList nameValuePairs)
Sets data to be returned in this response |
long |
setEndTime()
Stop the timer for how long this query took. |
long |
setEndTime(long endtime)
Set the in milliseconds when the response officially finished. |
void |
setException(Exception e)
Causes an error to be returned instead of the results. |
void |
setReturnFields(Set<String> fields)
Sets the document field names of fields to return by default when returning DocLists |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NamedList values
getValues()
,
add(java.lang.String, java.lang.Object)
,
setAllValues(org.apache.solr.util.NamedList)
,
Note on Returnable Dataprotected Set<String> defaultReturnFields
protected Exception err
protected long endtime
setEndTime(long)
,
getEndTime()
Constructor Detail |
---|
public SolrQueryResponse()
Method Detail |
---|
public NamedList getValues()
public void setAllValues(NamedList nameValuePairs)
public void setReturnFields(Set<String> fields)
public Set<String> getReturnFields()
public void add(String name, Object val)
name
- the name of the value - may be null if unnamedval
- the value to add - also may be null since null is a legal valuepublic void setException(Exception e)
public Exception getException()
public long getEndTime()
public long setEndTime()
setEndTime(long)
public long setEndTime(long endtime)
setEndTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |