public class ConcurrentUpdateSolrClient extends SolrClient
UpdateRequest
are converted to http request
parameters. When params change between UpdateRequests a new HTTP
request is started.
Although any SolrClient request can be made with this implementation, it is
only recommended to use ConcurrentUpdateSolrClient with /update
requests. The class HttpSolrClient
is better suited for the
query interface.Modifier and Type | Class and Description |
---|---|
static class |
ConcurrentUpdateSolrClient.Builder
Constructs
ConcurrentUpdateSolrClient instances from provided configuration. |
Modifier | Constructor and Description |
---|---|
protected |
ConcurrentUpdateSolrClient(ConcurrentUpdateSolrClient.Builder builder) |
protected |
ConcurrentUpdateSolrClient(String solrServerUrl,
org.apache.http.client.HttpClient client,
int queueSize,
int threadCount,
ExecutorService es,
boolean streamDeletes)
Deprecated.
use
ConcurrentUpdateSolrClient(Builder) instead, as it is a more extension/subclassing-friendly alternative |
Modifier and Type | Method and Description |
---|---|
void |
blockUntilFinished() |
void |
close() |
Set<String> |
getQueryParams() |
void |
handleError(Throwable ex) |
void |
onSuccess(org.apache.http.HttpResponse resp)
Intended to be used as an extension point for doing post processing after a request completes.
|
NamedList<Object> |
request(SolrRequest request,
String collection)
Execute a request against a Solr server for a given collection
|
void |
setConnectionTimeout(int timeout)
Deprecated.
since 7.0 Use
ConcurrentUpdateSolrClient.Builder methods instead. |
void |
setParser(ResponseParser responseParser) |
void |
setPollQueueTime(int pollQueueTime) |
void |
setQueryParams(Set<String> queryParams)
Expert Method.
|
void |
setRequestWriter(RequestWriter requestWriter) |
void |
setSoTimeout(int timeout)
Deprecated.
since 7.0 Use
ConcurrentUpdateSolrClient.Builder methods instead. |
void |
shutdownNow() |
add, add, add, add, add, add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback
@Deprecated protected ConcurrentUpdateSolrClient(String solrServerUrl, org.apache.http.client.HttpClient client, int queueSize, int threadCount, ExecutorService es, boolean streamDeletes)
ConcurrentUpdateSolrClient(Builder)
instead, as it is a more extension/subclassing-friendly alternativeprotected ConcurrentUpdateSolrClient(ConcurrentUpdateSolrClient.Builder builder)
public void setQueryParams(Set<String> queryParams)
queryParams
- set of param keys to only send via the query stringpublic NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
SolrClient
request
in class SolrClient
request
- the request to executecollection
- the collection to execute the request againstNamedList
containing the response from the serverSolrServerException
- if there is an error on the serverIOException
- If there is a low-level I/O error.public void blockUntilFinished()
public void handleError(Throwable ex)
public void onSuccess(org.apache.http.HttpResponse resp)
public void close()
@Deprecated public void setConnectionTimeout(int timeout)
ConcurrentUpdateSolrClient.Builder
methods instead.@Deprecated public void setSoTimeout(int timeout)
ConcurrentUpdateSolrClient.Builder
methods instead.public void shutdownNow()
public void setParser(ResponseParser responseParser)
public void setPollQueueTime(int pollQueueTime)
pollQueueTime
- time for an open connection to wait for updates when
the queue is empty.public void setRequestWriter(RequestWriter requestWriter)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.