org.apache.solr.client.solrj.impl
Class StreamingUpdateSolrServer
java.lang.Object
org.apache.solr.client.solrj.SolrServer
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer
- All Implemented Interfaces:
- Serializable
Deprecated. use ConcurrentUpdateSolrServer
instead.
@Deprecated
public class StreamingUpdateSolrServer
- extends CommonsHttpSolrServer
StreamingUpdateSolrServer
buffers all added documents and writes them
into open HTTP connections. This class is thread safe.
Although any SolrServer request can be made with this implementation,
it is only recommended to use StreamingUpdateSolrServer
with
/update requests. The base class {&link CommonsHttpSolrServer} is
better suited for the query interface, or for situations where you
need to detect errors or catch exceptions from udpate requests.
- Since:
- solr 1.4
- Version:
- $Id: CommonsHttpSolrServer.java 724175 2008-12-07 19:07:11Z ryan $
- See Also:
- Serialized Form
Constructor Summary |
StreamingUpdateSolrServer(String solrServerUrl,
org.apache.commons.httpclient.HttpClient client,
int queueSize,
int threadCount)
Deprecated. Uses the supplied HttpClient to send documents to the Solr server, the HttpClient should be instantiated using a
MultiThreadedHttpConnectionManager. |
StreamingUpdateSolrServer(String solrServerUrl,
int queueSize,
int threadCount)
Deprecated. Uses an internal MultiThreadedHttpConnectionManager to manage http connections |
Methods inherited from class org.apache.solr.client.solrj.impl.CommonsHttpSolrServer |
add, add, addBeans, addBeans, getBaseURL, getHttpClient, getInvariantParams, getParser, request, setAllowCompression, setBaseURL, setConnectionManagerTimeout, setConnectionManagerTimeout, setConnectionTimeout, setDefaultMaxConnectionsPerHost, setFollowRedirects, setMaxRetries, setMaxTotalConnections, setParser, setRequestWriter, setSoTimeout |
Methods inherited from class org.apache.solr.client.solrj.SolrServer |
add, add, add, add, addBean, addBean, addBeans, addBeans, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, getBinder, optimize, optimize, optimize, ping, query, query, rollback |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamingUpdateSolrServer
public StreamingUpdateSolrServer(String solrServerUrl,
int queueSize,
int threadCount)
throws MalformedURLException
- Deprecated.
- Uses an internal MultiThreadedHttpConnectionManager to manage http connections
- Parameters:
solrServerUrl
- The Solr server URLqueueSize
- The buffer size before the documents are sent to the serverthreadCount
- The number of background threads used to empty the queue
- Throws:
MalformedURLException
StreamingUpdateSolrServer
public StreamingUpdateSolrServer(String solrServerUrl,
org.apache.commons.httpclient.HttpClient client,
int queueSize,
int threadCount)
throws MalformedURLException
- Deprecated.
- Uses the supplied HttpClient to send documents to the Solr server, the HttpClient should be instantiated using a
MultiThreadedHttpConnectionManager.
- Throws:
MalformedURLException
request
public NamedList<Object> request(SolrRequest request)
throws SolrServerException,
IOException
- Deprecated.
- Description copied from class:
CommonsHttpSolrServer
- Process the request. If
SolrRequest.getResponseParser()
is null, then use
CommonsHttpSolrServer.getParser()
- Overrides:
request
in class CommonsHttpSolrServer
- Parameters:
request
- The SolrRequest
to process
- Returns:
- The
NamedList
result
- Throws:
SolrServerException
IOException
- See Also:
CommonsHttpSolrServer.request(org.apache.solr.client.solrj.SolrRequest, org.apache.solr.client.solrj.ResponseParser)
blockUntilFinished
public void blockUntilFinished()
- Deprecated.
handleError
public void handleError(Throwable ex)
- Deprecated.