Interface SolrCollectionResolver
-
- All Known Implementing Classes:
DefaultSolrCollectionResolver
public interface SolrCollectionResolverSolr 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetPrimarySolrCollectionForIndexable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)Retrieve the correct primary (foreground) Solr alias name for the givenIndexable.StringgetPrimarySolrCollectionForType(com.broadleafcommerce.search.api.type.IndexableType type)Retrieve the correct primary (foreground) Solr alias name for the givenIndexableType.StringgetPrimarySolrCollectionForType(String type)Retrieve the correct primary (foreground) Solr alias name for the given type.StringgetSecondarySolrCollectionForIndexable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)Retrieve the correct secondary (background) Solr alias name for the givenIndexable.StringgetSecondarySolrCollectionForType(com.broadleafcommerce.search.api.type.IndexableType type)Retrieve the correct secondary (background) Solr alias name for the givenIndexableType.StringgetSecondarySolrCollectionForType(String type)Retrieve the correct secondary (background) Solr alias name for the given type.
-
-
-
Method Detail
-
getPrimarySolrCollectionForType
String getPrimarySolrCollectionForType(com.broadleafcommerce.search.api.type.IndexableType type)
Retrieve the correct primary (foreground) Solr alias name for the givenIndexableType.- 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 givenIndexableType.- 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 givenIndexable.- 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 givenIndexable.- 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
-
-