Class SolrCommitter

All Implemented Interfaces:
BatchConsumer, Committer, Configurable<SolrCommitterConfig>, AutoCloseable

public class SolrCommitter extends AbstractBatchCommitter<SolrCommitterConfig>

Commits documents to Apache Solr.

Solr Client:

You can specify which type of Solr Client to use. The expected configuration value of "solrURL" is influenced by the client type chosen. Default client type is Http2SolrClient. The clients are:

Http2SolrClient
Default client. For direct access to a single Solr node. Ideal for local development or small setups. Expects a Solr URL.
CloudSolrClient
For use with a SolrCloud cluster. Expects a comma-separated list of Zookeeper hosts.
LBHttp2SolrClient
Simple load-balancing as an alternative to an external load balancer. Expects two or more Solr node URLs (comma-separated).
ConcurrentUpdateHttp2SolrClient
Optimized for mass upload on a single node. Not best for queries. Expects a Solr URL.

The above client types are using the HTTP/2 protocol. They should be favored over the following, which are using HTTP/1.x and are considered deprecated:

HttpSolrClient
For direct access to a single Solr node. Ideal for local development. Expects a Solr URL.
LBHttpSolrClient
Simple load-balancing as an alternative to an external load balancer. Expects two or more Solr node URLs (comma-separated).
ConcurrentUpdateSolrClient
Optimized for mass upload on a single node. Not best for queries. Expects a Solr URL.

Authentication

Basic authentication is supported for password-protected Solr installations.