public class SolrIndexUtils extends OracleIndexUtils
Constructor and Description |
---|
SolrIndexUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
appendDTToKey(java.lang.String key, java.lang.Class dtClass)
Appends the value's data type SUFFIX to the specified key.
|
static void |
commitCloudServer(org.apache.solr.client.solrj.impl.CloudSolrServer cloudSolrServer, long timeout)
Commit the specified CloudSolrServer object
|
static org.apache.solr.client.solrj.impl.CloudSolrServer |
getCloudSolrServer(java.lang.String solrServerUrl, java.lang.String directoryName, int zkTimeout, long writeTimeout)
Gets a new CloudSolrServer object to handle operations over the index.
|
static java.lang.String |
getDatatypePrefix(java.lang.Class dtClass)
Gets the data type prefix for the given data type class.
|
static void |
quietlyCloseCloudSolrServer(org.apache.solr.client.solrj.impl.CloudSolrServer cloudSolrServer)
Closes the specified CloudSolrServer object
|
getDatatypeClass, getValueAsString
public static java.lang.String appendDTToKey(java.lang.String key, java.lang.Class dtClass)
key
- the key.dtClass
- the value's data typepublic static void commitCloudServer(org.apache.solr.client.solrj.impl.CloudSolrServer cloudSolrServer, long timeout)
cloudSolrServer
- a CloudSolrServer
objecttimeout
- the timeout in (ms) to retry the operation if it was not successfulpublic static org.apache.solr.client.solrj.impl.CloudSolrServer getCloudSolrServer(java.lang.String solrServerUrl, java.lang.String directoryName, int zkTimeout, long writeTimeout)
solrServerUrl
- the SolrCloud server URL used to connect to the SolrCloud service. E.g., http://localhost:2181/solrdirectoryName
- the name of the directoryzkTimeout
- a positive integer representing the timeout (in seconds) used to wait for a Zookeeper connection.writeTimeout
- the timeout (in ms) that is allowed to wait for a index write operation.public static java.lang.String getDatatypePrefix(java.lang.Class dtClass)
public static void quietlyCloseCloudSolrServer(org.apache.solr.client.solrj.impl.CloudSolrServer cloudSolrServer)
cloudSolrServer
- a CloudSolrServer
objectCopyright © 2017, 2018 Oracle and/or its affiliates. All Rights Reserved.