Interface SolrCollectionResolver

All Known Implementing Classes:
DefaultSolrCollectionResolver

public interface SolrCollectionResolver
Solr allows you to create multiple collections (a.k.a. Cores or Indexes). By default, we typically use 2 identical copies of a collection: a foreground, or primary collection and a background or backup collection. These collections can have arbitrary names, but they can also have aliases. It's common to delete all of the information in a background collection, re-index or reload that collection, and then re-alias so that the background becomes the foreground and the foreground becomes the background.

This component provides a way to resolve the correct alias(es) for a given type.

Author:
Kelly Tisdell (ktisdell)
  • Method Details

    • getPrimarySolrCollectionForType

      String getPrimarySolrCollectionForType(com.broadleafcommerce.search.api.type.IndexableType type)
      Retrieve the correct primary (foreground) Solr alias name for the given IndexableType.
      Parameters:
      type - Searchable type
      Returns:
      The primary alias
    • getSecondarySolrCollectionForType

      String getSecondarySolrCollectionForType(com.broadleafcommerce.search.api.type.IndexableType type)
      Retrieve the correct secondary (background) Solr alias name for the given IndexableType.
      Parameters:
      type - Searchable type
      Returns:
      The secondary alias
    • getPrimarySolrCollectionForIndexable

      String getPrimarySolrCollectionForIndexable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
      Retrieve the correct primary (foreground) Solr alias name for the given Indexable.
      Parameters:
      indexable - Indexable item
      Returns:
      The primary alias
    • getSecondarySolrCollectionForIndexable

      String getSecondarySolrCollectionForIndexable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
      Retrieve the correct secondary (background) Solr alias name for the given Indexable.
      Parameters:
      indexable - Indexable item
      Returns:
      The secondary alias
    • getPrimarySolrCollectionForType

      String getPrimarySolrCollectionForType(String type)
      Retrieve the correct primary (foreground) Solr alias name for the given type.
      Parameters:
      type - Searchable type
      Returns:
      The primary alias
    • getSecondarySolrCollectionForType

      String getSecondarySolrCollectionForType(String type)
      Retrieve the correct secondary (background) Solr alias name for the given type.
      Parameters:
      type - Searchable type
      Returns:
      The secondary alias