|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.client.solrj.SolrServer
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
public class CommonsHttpSolrServer
Field Summary | |
---|---|
protected String |
_baseURL
The URL of the Solr server. |
protected org.apache.solr.common.params.ModifiableSolrParams |
_invariantParams
|
protected ResponseParser |
_parser
|
static String |
AGENT
|
Constructor Summary | |
---|---|
CommonsHttpSolrServer(String solrServerUrl)
|
|
CommonsHttpSolrServer(String solrServerUrl,
org.apache.commons.httpclient.HttpClient httpClient)
Talk to the Solr server via the given HttpClient. |
|
CommonsHttpSolrServer(String solrServerUrl,
org.apache.commons.httpclient.HttpClient httpClient,
boolean useMultiPartPost)
|
|
CommonsHttpSolrServer(String solrServerUrl,
org.apache.commons.httpclient.HttpClient httpClient,
ResponseParser parser)
|
|
CommonsHttpSolrServer(URL baseURL)
|
|
CommonsHttpSolrServer(URL baseURL,
org.apache.commons.httpclient.HttpClient client)
|
|
CommonsHttpSolrServer(URL baseURL,
org.apache.commons.httpclient.HttpClient client,
boolean useMultiPartPost)
|
|
CommonsHttpSolrServer(URL baseURL,
org.apache.commons.httpclient.HttpClient client,
ResponseParser parser,
boolean useMultiPartPost)
|
Method Summary | |
---|---|
String |
getBaseURL()
|
org.apache.commons.httpclient.HttpClient |
getHttpClient()
|
org.apache.solr.common.params.ModifiableSolrParams |
getInvariantParams()
Parameters are added to ever request regardless. |
ResponseParser |
getParser()
|
org.apache.solr.common.util.NamedList<Object> |
request(SolrRequest request)
Process the request. |
org.apache.solr.common.util.NamedList<Object> |
request(SolrRequest request,
ResponseParser processor)
|
void |
setAllowCompression(boolean allowCompression)
set allowCompression. |
void |
setBaseURL(String baseURL)
|
void |
setConnectionManagerTimeout(int timeout)
set connectionManagerTimeout on the HttpClient. |
void |
setConnectionTimeout(int timeout)
set connectionTimeout on the underlying HttpConnectionManager |
void |
setDefaultMaxConnectionsPerHost(int connections)
set maxConnectionsPerHost on the underlying HttpConnectionManager |
void |
setFollowRedirects(boolean followRedirects)
set followRedirects. |
void |
setMaxRetries(int maxRetries)
set maximum number of retries to attempt in the event of transient errors. |
void |
setMaxTotalConnections(int connections)
set maxTotalConnection on the underlying HttpConnectionManager |
void |
setParser(ResponseParser processor)
Note: Setting this value is not thread-safe. |
void |
setSoTimeout(int timeout)
set soTimeout (read timeout) on the underlying HttpConnectionManager. |
Methods inherited from class org.apache.solr.client.solrj.SolrServer |
---|
add, add, addBean, addBeans, commit, commit, deleteById, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String AGENT
protected String _baseURL
protected org.apache.solr.common.params.ModifiableSolrParams _invariantParams
protected ResponseParser _parser
Constructor Detail |
---|
public CommonsHttpSolrServer(String solrServerUrl) throws MalformedURLException
solrServerUrl
- The URL of the Solr server. For
example, "http://localhost:8983/solr/
"
if you are using the standard distribution Solr webapp
on your local machine.
MalformedURLException
public CommonsHttpSolrServer(String solrServerUrl, org.apache.commons.httpclient.HttpClient httpClient) throws MalformedURLException
MalformedURLException
public CommonsHttpSolrServer(String solrServerUrl, org.apache.commons.httpclient.HttpClient httpClient, boolean useMultiPartPost) throws MalformedURLException
MalformedURLException
public CommonsHttpSolrServer(String solrServerUrl, org.apache.commons.httpclient.HttpClient httpClient, ResponseParser parser) throws MalformedURLException
MalformedURLException
public CommonsHttpSolrServer(URL baseURL)
baseURL
- The URL of the Solr server. For
example, "http://localhost:8983/solr/
"
if you are using the standard distribution Solr webapp
on your local machine.public CommonsHttpSolrServer(URL baseURL, org.apache.commons.httpclient.HttpClient client)
public CommonsHttpSolrServer(URL baseURL, org.apache.commons.httpclient.HttpClient client, boolean useMultiPartPost)
public CommonsHttpSolrServer(URL baseURL, org.apache.commons.httpclient.HttpClient client, ResponseParser parser, boolean useMultiPartPost)
Method Detail |
---|
public org.apache.solr.common.util.NamedList<Object> request(SolrRequest request) throws SolrServerException, IOException
SolrRequest.getResponseParser()
is null, then use
getParser()
request
in class SolrServer
request
- The SolrRequest
to process
NamedList
result
SolrServerException
IOException
request(org.apache.solr.client.solrj.SolrRequest, org.apache.solr.client.solrj.ResponseParser)
public org.apache.solr.common.util.NamedList<Object> request(SolrRequest request, ResponseParser processor) throws SolrServerException, IOException
SolrServerException
IOException
public org.apache.solr.common.params.ModifiableSolrParams getInvariantParams()
public String getBaseURL()
public void setBaseURL(String baseURL)
public ResponseParser getParser()
public void setParser(ResponseParser processor)
processor
- The ResponseParser
public org.apache.commons.httpclient.HttpClient getHttpClient()
public void setConnectionTimeout(int timeout)
public void setConnectionManagerTimeout(int timeout)
public void setSoTimeout(int timeout)
public void setDefaultMaxConnectionsPerHost(int connections)
public void setMaxTotalConnections(int connections)
public void setFollowRedirects(boolean followRedirects)
public void setAllowCompression(boolean allowCompression)
public void setMaxRetries(int maxRetries)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |