Class SolrConfiguration

java.lang.Object
org.apache.camel.component.solr.SolrConfiguration
All Implemented Interfaces:
Cloneable

@UriParams public class SolrConfiguration extends Object implements Cloneable
  • Constructor Details

  • Method Details

    • newInstance

      public static SolrConfiguration newInstance(String endpointUri, String remaining)
    • getSolrScheme

      public SolrConfiguration.SolrScheme getSolrScheme()
    • setSolrScheme

      public void setSolrScheme(SolrConfiguration.SolrScheme solrScheme)
    • getUrl

      public String getUrl()
    • getStreamingQueueSize

      public int getStreamingQueueSize()
    • setStreamingQueueSize

      public void setStreamingQueueSize(int streamingQueueSize)
      Sets the queue size for the ConcurrentUpdateSolrClient
    • getStreamingThreadCount

      public int getStreamingThreadCount()
    • setStreamingThreadCount

      public void setStreamingThreadCount(int streamingThreadCount)
      Sets the number of threads for the ConcurrentUpdateSolrClient
    • getMaxRetries

      public Integer getMaxRetries()
    • setMaxRetries

      public void setMaxRetries(Integer maxRetries)
      Maximum number of retries to attempt in the event of transient errors
    • getSoTimeout

      public Integer getSoTimeout()
    • setSoTimeout

      public void setSoTimeout(Integer soTimeout)
      Sets the socket timeout on the SolrClient
    • getConnectionTimeout

      public Integer getConnectionTimeout()
    • setConnectionTimeout

      public void setConnectionTimeout(Integer connectionTimeout)
      Sets the connection timeout on the SolrClient
    • getDefaultMaxConnectionsPerHost

      public Integer getDefaultMaxConnectionsPerHost()
    • setDefaultMaxConnectionsPerHost

      public void setDefaultMaxConnectionsPerHost(Integer defaultMaxConnectionsPerHost)
      maxConnectionsPerHost on the underlying HttpConnectionManager
    • getMaxTotalConnections

      public Integer getMaxTotalConnections()
    • setMaxTotalConnections

      public void setMaxTotalConnections(Integer maxTotalConnections)
      maxTotalConnection on the underlying HttpConnectionManager
    • getFollowRedirects

      public Boolean getFollowRedirects()
    • setFollowRedirects

      public void setFollowRedirects(Boolean followRedirects)
      Indicates whether redirects are used to get to the Solr server
    • getAllowCompression

      public Boolean getAllowCompression()
    • setAllowCompression

      public void setAllowCompression(Boolean allowCompression)
      Server side must support gzip or deflate for this to have any effect
    • getZkHost

      public String getZkHost()
    • setZkHost

      public void setZkHost(String zkHost)
      Set the ZooKeeper host(s) urls which the CloudSolrClient uses, e.g. "zkHost=localhost:2181,localhost:2182". Optionally add the chroot, e.g. "zkHost=localhost:2181,localhost:2182/rootformysolr". In case the first part of the url path (='contextroot') is set to 'solr' (e.g. 'localhost:2181/solr' or 'localhost:2181/solr/..'), then that path is not considered as zookeeper chroot for backward compatibility reasons (this behaviour can be overridden via zkChroot parameter).
    • getZkChroot

      public String getZkChroot()
    • setZkChroot

      public void setZkChroot(String zkChroot)
      Set the chroot of the zookeeper connection (include the leading slash; e.g. '/mychroot')
    • getCollection

      public String getCollection()
    • setCollection

      public void setCollection(String collection)
      Set the default collection for SolrCloud
    • getRequestHandler

      public String getRequestHandler()
    • setRequestHandler

      public void setRequestHandler(String requestHandler)
      Set the request handler to be used
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
      Sets username for basic auth plugin enabled servers
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
      Sets password for basic auth plugin enabled servers
    • isAutoCommit

      public boolean isAutoCommit()
    • setAutoCommit

      public void setAutoCommit(boolean autoCommit)
      If true, each producer operation will be automatically followed by a commit
    • getSolrClient

      public org.apache.solr.client.solrj.SolrClient getSolrClient()
    • setSolrClient

      public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient)
      Uses the provided solr client to connect to solr. When this parameter is not specified, camel applies the following rules to determine the SolrClient: 1) when zkHost or zkChroot (=zookeeper root) parameter is set, then the CloudSolrClient is used. 2) when multiple hosts are specified in the uri (separated with a comma), then the CloudSolrClient (uri scheme is 'solrCloud') or the LBHttpSolrClient (uri scheme is not 'solrCloud') is used. 3) when the solr operation is INSERT_STREAMING, then the ConcurrentUpdateSolrClient is used. 4) otherwise, the HttpSolrClient is used. Note: A CloudSolrClient should point to zookeeper endpoint(s); other clients point to Solr endpoint(s). The SolrClient can also be set via the exchange header 'CamelSolrClient'.
    • getHttpClient

      public org.apache.http.client.HttpClient getHttpClient()
    • setHttpClient

      public void setHttpClient(org.apache.http.client.HttpClient httpClient)
      Sets the http client to be used by the solrClient. This is only applicable when solrClient is not set.
    • getUseConcurrentUpdateSolrClient

      public boolean getUseConcurrentUpdateSolrClient()
    • getSolrEndpoint

      public SolrEndpoint getSolrEndpoint()
    • deepCopy

      public SolrConfiguration deepCopy()