public class NoAutoCommitUpdateClient extends AbstractAmetysConcurrentUpdateClient
SolrClient
which uses the Solr `noAutoCommit` Update Request Processor chain, so as to not trigger the autoCommit mechanism.ConcurrentUpdateSolrClient.Builder
Modifier and Type | Field and Description |
---|---|
private static String |
__UPDATE_CHAIN_NAME |
Constructor and Description |
---|
NoAutoCommitUpdateClient(String solrServerUrl,
String collectionName,
int queueSize,
int threadCount,
Logger logger)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private void |
_setUpdateRequestProcessorChain(SolrRequest request) |
NamedList<Object> |
request(SolrRequest request,
String collection) |
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, handleError, onSuccess, optimize, optimize, optimize, optimize, optimize, optimize, rollback, rollback
blockUntilFinished, close, getQueryParams, setConnectionTimeout, setParser, setPollQueueTime, setQueryParams, setRequestWriter, setSoTimeout, shutdownNow
private static final String __UPDATE_CHAIN_NAME
public NoAutoCommitUpdateClient(String solrServerUrl, String collectionName, int queueSize, int threadCount, Logger logger)
solrServerUrl
- The Solr server URLcollectionName
- The name of the collection, on which operations will be allowed. Operations on other collections will be forbidden.queueSize
- The buffer size before the documents are sent to the serverthreadCount
- The number of background threads used to empty the queuelogger
- internal loggerpublic NamedList<Object> request(SolrRequest request, String collection) throws SolrServerException, IOException
request
in class ConcurrentUpdateSolrClient
SolrServerException
IOException
private void _setUpdateRequestProcessorChain(SolrRequest request)