Class SolrClientUtils

java.lang.Object
org.springframework.data.solr.server.support.SolrClientUtils

public class SolrClientUtils extends Object
SolrClientUtils replaces SolrServerUtils from version 1.x
Since:
2.0
  • Method Details

    • 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
    • close

      public static void close(org.apache.solr.client.solrj.SolrClient solrClient)
      Close the SolrClient by calling Closeable.close() or shutdown for the generation 5 libraries.
      Parameters:
      solrClient - must not be null.
      Throws:
      org.springframework.dao.DataAccessResourceFailureException
      Since:
      2.1