public abstract class SolrRequest<T extends SolrResponse> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
SolrRequest.METHOD |
| Constructor and Description |
|---|
SolrRequest(SolrRequest.METHOD m,
String path) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
createResponse(SolrClient client)
Create a new SolrResponse to hold the response from the server
|
abstract Collection<ContentStream> |
getContentStreams() |
SolrRequest.METHOD |
getMethod() |
abstract SolrParams |
getParams() |
String |
getPath() |
Set<String> |
getQueryParams()
Parameter keys that are sent via the query string
|
ResponseParser |
getResponseParser() |
StreamingResponseCallback |
getStreamingResponseCallback() |
T |
process(SolrClient client)
Send this request to a
SolrClient and return the response |
T |
process(SolrClient client,
String collection)
Send this request to a
SolrClient and return the response |
void |
setMethod(SolrRequest.METHOD method) |
void |
setPath(String path) |
void |
setQueryParams(Set<String> queryParams) |
void |
setResponseParser(ResponseParser responseParser)
Optionally specify how the Response should be parsed.
|
void |
setStreamingResponseCallback(StreamingResponseCallback callback) |
public SolrRequest(SolrRequest.METHOD m, String path)
public SolrRequest.METHOD getMethod()
public void setMethod(SolrRequest.METHOD method)
public String getPath()
public void setPath(String path)
public ResponseParser getResponseParser()
ResponseParserpublic void setResponseParser(ResponseParser responseParser)
responseParser - The ResponseParserpublic StreamingResponseCallback getStreamingResponseCallback()
public void setStreamingResponseCallback(StreamingResponseCallback callback)
public Set<String> getQueryParams()
public abstract SolrParams getParams()
public abstract Collection<ContentStream> getContentStreams() throws IOException
IOExceptionprotected abstract T createResponse(SolrClient client)
client - the SolrClient the request will be sent topublic final T process(SolrClient client, String collection) throws SolrServerException, IOException
SolrClient and return the responseclient - the SolrClient to communicate withcollection - the collection to execute the request againstSolrServerException - if there is an error on the Solr serverIOException - if there is a communication errorpublic final T process(SolrClient client) throws SolrServerException, IOException
SolrClient and return the responseclient - the SolrClient to communicate withSolrServerException - if there is an error on the Solr serverIOException - if there is a communication errorCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.