public class SolrClientUtils
extends java.lang.Object
| Constructor and Description |
|---|
SolrClientUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createCollection(java.lang.String hostname,
int port,
java.lang.String collectionName,
java.lang.String configurationName)
Creates a new collection
|
static void |
uploadConfiguration(java.lang.String hostname,
int port,
java.lang.String configurationName,
java.net.URL solrConfig,
java.net.URL solrSchema)
Creates a new configuration and uploads the solrconfig.xml and schema.xml
|
public static void uploadConfiguration(java.lang.String hostname,
int port,
java.lang.String configurationName,
java.net.URL solrConfig,
java.net.URL solrSchema)
throws java.net.URISyntaxException,
java.io.IOException
hostname - the Hostname under which solr is reachableport - the Port on which solr is runningconfigurationName - the name of the configuration which should be createdsolrConfig - the url under which the solrconfig.xml can be foundsolrSchema - the url under which the schema.xml can be found or null if the default schema should be usedjava.net.URISyntaxExceptionjava.io.IOExceptionpublic static void createCollection(java.lang.String hostname,
int port,
java.lang.String collectionName,
java.lang.String configurationName)
throws java.net.URISyntaxException,
java.io.IOException
hostname - the Hostname under which solr is reachableport - The Port on which solr is runningcollectionName - the name of the collection which should be createdconfigurationName - the name of the configuration which should used to create the collection
or null if the default configuration should be usedjava.net.URISyntaxExceptionjava.io.IOException