Class SolrConfiguration

java.lang.Object
org.apache.camel.component.solr.SolrConfiguration

@UriParams public class SolrConfiguration extends Object
  • Constructor Details

    • SolrConfiguration

      public SolrConfiguration()
  • Method Details

    • configure

      public void configure(String uriString) throws URISyntaxException
      Uri of the solr instance with :host:port. Only a single solr instance should be targeted. When failover multiple instances is required, use a camel Failover Load Balancer with sticky mode or provide your configured CloudSolrClient as client. Only host and port are "documented" for the endpoint uri, without a base path (currently /solr and /api). This is to promote the use of solr endpoint without a base path: we want to avoid locking in (this evolution of) the base path into the camel configuration of the endpoint.
      Throws:
      URISyntaxException
    • getSolrBaseUrl

      public String getSolrBaseUrl()
    • getSolrBaseUrl

      public static String getSolrBaseUrl(boolean sslEnabled, String host, int port, String basePath)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
      The solr instance host name (set to 'default' to use the host name defined on component level)
    • getPort

      public int getPort()
    • setBasePath

      public void setBasePath(String basePath)
      The solr instance base path (usually "/solr")
    • getBasePath

      public String getBasePath()
    • setPort

      public void setPort(int port)
      The solr instance port number
    • getOperation

      public SolrOperation getOperation()
    • setOperation

      public void setOperation(SolrOperation operation)
      What operation to perform
    • isAutoCommit

      public boolean isAutoCommit()
    • setAutoCommit

      public void setAutoCommit(boolean autoCommit)
      If true, each producer insert/delete operation will be automatically performing a commit
    • getFrom

      public Integer getFrom()
      Starting index of the response.
    • setFrom

      public void setFrom(Integer from)
    • getSize

      public Integer getSize()
      Size of the response.
    • setSize

      public void setSize(Integer size)
    • getCollection

      public String getCollection()
      The name of the collection to act against
    • setCollection

      public void setCollection(String collection)
    • getRequestHandler

      public String getRequestHandler()
      The path of the update request handler (use for update requests / set solr parameter qt for search requests)
    • setRequestHandler

      public void setRequestHandler(String requestHandler)
    • getSolrClient

      public org.apache.solr.client.solrj.SolrClient getSolrClient()
      The solr client to connect to solr. When solrClient bean is provided, all connection properties will be used from that solrClient (host, port, username, password, connectionTimeout, requestTimeout, enableSSL, ...). When not explicitly configured, camel uses the HttpJdkSolrClient.
    • setSolrClient

      public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient)
    • isDeleteByQuery

      public boolean isDeleteByQuery()
      For the delete instruction, interprete body as query/queries instead of id/ids.
    • setDeleteByQuery

      public void setDeleteByQuery(boolean deleteByQuery)
    • getUsername

      public String getUsername()
      Basic authenticate user
    • setUsername

      public void setUsername(String username)
    • getPassword

      public String getPassword()
      Password for authenticating
    • setPassword

      public void setPassword(String password)
    • isEnableSSL

      public boolean isEnableSSL()
      Enable SSL
    • setEnableSSL

      public void setEnableSSL(boolean enableSSL)
    • getCertificatePath

      public String getCertificatePath()
      The certificate that can be used to access the solr host. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems.
    • setCertificatePath

      public void setCertificatePath(String certificatePath)
    • getConnectionTimeout

      public Long getConnectionTimeout()
      The time in ms to wait before connection will time out.
    • setConnectionTimeout

      public void setConnectionTimeout(Long connectionTimeout)
    • isAsync

      public boolean isAsync()
      Use async request processing (when supported by the solr client)
    • setAsync

      public void setAsync(boolean async)
    • getRequestTimeout

      public Long getRequestTimeout()
      The time in ms to wait before the request will time out (former soTimeout).
    • setRequestTimeout

      public void setRequestTimeout(Long requestTimeout)