Spring Data Solr

org.springframework.data.solr.server.support
Class SolrServerUtils

java.lang.Object
  extended by org.springframework.data.solr.server.support.SolrServerUtils

public class SolrServerUtils
extends Object

Author:
Christoph Strobl

Method Summary
static String appendCoreToBaseUrl(String baseUrl, String core)
          Append core to given baseUrl
static
<T extends org.apache.solr.client.solrj.SolrServer>
T
clone(T solrServer)
           
static
<T extends org.apache.solr.client.solrj.SolrServer>
T
clone(T solrServer, String core)
          Create a clone of given SolrServer and modify baseUrl of clone to point to the given core.
static String resolveSolrCoreName(Class<?> type)
          Resolve solr core/collection name for given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveSolrCoreName

public static String resolveSolrCoreName(Class<?> type)
Resolve solr core/collection name for given type.

Parameters:
type -
Returns:
empty string if SolrDocument not present or SolrDocument.solrCoreName() is blank.
Since:
1.1

clone

public static <T extends org.apache.solr.client.solrj.SolrServer> T clone(T solrServer)

clone

public static <T extends org.apache.solr.client.solrj.SolrServer> T clone(T solrServer,
                                                                          String core)
Create a clone of given SolrServer and modify baseUrl of clone to point to the given core.

Parameters:
solrServer - Non null reference SolrServer to copy properties from.
core - Name of solr core to point to.
Returns:
Throws:
BeanInstantiationException - if creating instance failed

appendCoreToBaseUrl

public static String appendCoreToBaseUrl(String baseUrl,
                                         String core)
Append core to given baseUrl

Parameters:
baseUrl -
core -
Returns:

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.