Package org.apache.camel.component.solr
Class SolrConfiguration
java.lang.Object
org.apache.camel.component.solr.SolrConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidUri of the solr instance with :host:port.The certificate that can be used to access the solr host.The name of the collection to act againstThe time in ms to wait before connection will time out.getFrom()Starting index of the response.getHost()Password for authenticatingintgetPort()The path of the update request handler (use for update requests / set solr parameter qt for search requests)The time in ms to wait before the request will time out (former soTimeout).getSize()Size of the response.static StringgetSolrBaseUrl(boolean sslEnabled, String host, int port, String basePath) org.apache.solr.client.solrj.SolrClientThe solr client to connect to solr.Basic authenticate userbooleanisAsync()Use async request processing (when supported by the solr client)booleanbooleanFor the delete instruction, interprete body as query/queries instead of id/ids.booleanEnable SSLvoidsetAsync(boolean async) voidsetAutoCommit(boolean autoCommit) If true, each producer insert/delete operation will be automatically performing a commitvoidsetBasePath(String basePath) The solr instance base path (usually "/solr")voidsetCertificatePath(String certificatePath) voidsetCollection(String collection) voidsetConnectionTimeout(Long connectionTimeout) voidsetDeleteByQuery(boolean deleteByQuery) voidsetEnableSSL(boolean enableSSL) voidvoidThe solr instance host name (set to 'default' to use the host name defined on component level)voidsetOperation(SolrOperation operation) What operation to performvoidsetPassword(String password) voidsetPort(int port) The solr instance port numbervoidsetRequestHandler(String requestHandler) voidsetRequestTimeout(Long requestTimeout) voidvoidsetSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) voidsetUsername(String username)
-
Constructor Details
-
SolrConfiguration
public SolrConfiguration()
-
-
Method Details
-
configure
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
-
getSolrBaseUrl
-
getHost
-
setHost
The solr instance host name (set to 'default' to use the host name defined on component level) -
getPort
public int getPort() -
setBasePath
The solr instance base path (usually "/solr") -
getBasePath
-
setPort
public void setPort(int port) The solr instance port number -
getOperation
-
setOperation
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
Starting index of the response. -
setFrom
-
getSize
Size of the response. -
setSize
-
getCollection
The name of the collection to act against -
setCollection
-
getRequestHandler
The path of the update request handler (use for update requests / set solr parameter qt for search requests) -
setRequestHandler
-
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
Basic authenticate user -
setUsername
-
getPassword
Password for authenticating -
setPassword
-
isEnableSSL
public boolean isEnableSSL()Enable SSL -
setEnableSSL
public void setEnableSSL(boolean enableSSL) -
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
-
getConnectionTimeout
The time in ms to wait before connection will time out. -
setConnectionTimeout
-
isAsync
public boolean isAsync()Use async request processing (when supported by the solr client) -
setAsync
public void setAsync(boolean async) -
getRequestTimeout
The time in ms to wait before the request will time out (former soTimeout). -
setRequestTimeout
-