public class SolrClientUtils extends Object
SolrClientUtils replaces SolrServerUtils from version 1.x| Modifier and Type | Method and Description |
|---|---|
static String |
appendCoreToBaseUrl(String baseUrl,
String core)
Append core to given baseUrl
|
static <T extends org.apache.solr.client.solrj.SolrClient> |
clone(T solrClient) |
static <T extends org.apache.solr.client.solrj.SolrClient> |
clone(T solrClient,
String core)
Create a clone of given
SolrClient and modify baseUrl of clone to point to the given core. |
static void |
close(org.apache.solr.client.solrj.SolrClient solrClient)
Close the
SolrClient by calling SolrClient.close() or shutdown for the generation 5
libraries. |
static String |
resolveSolrCoreName(Class<?> type)
Resolve solr core/collection name for given type.
|
public static String resolveSolrCoreName(Class<?> type)
type - SolrDocument not present or SolrDocument.solrCoreName() is blank.public static <T extends org.apache.solr.client.solrj.SolrClient> T clone(T solrClient)
public static <T extends org.apache.solr.client.solrj.SolrClient> T clone(T solrClient,
String core)
SolrClient and modify baseUrl of clone to point to the given core.solrClient - Non null reference SolrClient to copy properties from.core - Name of solr core to point to.BeanInstantiationException - if creating instance failedpublic static String appendCoreToBaseUrl(String baseUrl, String core)
baseUrl - core - public static void close(org.apache.solr.client.solrj.SolrClient solrClient)
SolrClient by calling SolrClient.close() or shutdown for the generation 5
libraries.solrClient - must not be null.DataAccessResourceFailureExceptionCopyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.