Interface SolrAdminProvider

All Superinterfaces:
SolrProvider
All Known Implementing Classes:
DefaultSolrCloudAdminProvider

public interface SolrAdminProvider extends SolrProvider
Provides basic administrative APIs for Solr. Solr and SolrJ allow for more functionality than we provide, by default, here. This encapsulates the functionality of some basic things that are often required. Note that most of this functionality is only provided by SolrCloud, which is an approach to running Solr in a cluster with Zookeeper as a state manager.
Author:
Kelly Tisdell (ktisdell)
  • Method Details

    • swapCollectionAliases

      void swapCollectionAliases(String alias1, String alias2) throws com.broadleafcommerce.search.api.SearchIndexException
      Re-assigns the aliases to the other alias' respective collection. This method assumes that the provided aliases are already mapped to collections.
      Parameters:
      alias1 - The first alias to swap
      alias2 - The second alias to swap
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if an error occurs swapping the alias' collections
    • readAliases

      Map<String,String> readAliases() throws com.broadleafcommerce.search.api.SearchIndexException
      Reads a map of alias name to Solr collection name.
      Returns:
      a map containing all aliases mapped to their Solr collection name
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if an error occurs reading the aliases
    • checkConnection

      void checkConnection() throws com.broadleafcommerce.search.api.SearchIndexException
      Check that the provider can connect to Solr.
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if the connection to Solr failed
    • recreateAlias

      void recreateAlias(String alias) throws com.broadleafcommerce.search.api.SearchIndexException
      The purpose of this is to empty, or delete and recreate, a collection.
      Parameters:
      alias - The alias to empty by deleting and recreating
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if an error occurs recreating the alias