Class DefaultSolrCollectionResolver

java.lang.Object
com.broadleafcommerce.search.provider.solr.DefaultSolrCollectionResolver
All Implemented Interfaces:
SolrCollectionResolver

public class DefaultSolrCollectionResolver extends Object implements SolrCollectionResolver
Default implementation of the SolrCollectionResolver. This assumes that the Solr alias names are stored as properties with the following format:

broadleaf.search.{type}.primaryAlias=some_primary_alias

or

broadleaf.search.{type}.secondaryAlias=some_secondary_alias

For example:

broadleaf.search.catalog.primaryAlias=catalog_primary

Note that the values returned here could be Solr collection names, but are typically Solr aliases. Primary aliases are the aliases assigned to the foreground, primary Solr collection. Secondary alias names are meant for background collections that are typically used to do a full reindex, where the data is deleted and then reloaded. Then the collections are re-aliased, making the newly loaded collection the primary, and the previous collection the background, ready to be deleted and reloaded.

Author:
Kelly Tisdell (ktisdell)
  • Field Details

  • Constructor Details

    • DefaultSolrCollectionResolver

      public DefaultSolrCollectionResolver(@NonNull @NonNull org.springframework.core.env.Environment environment)
  • Method Details