Class CategoryRoutedAlias

java.lang.Object
org.apache.solr.cloud.api.collections.RoutedAlias
org.apache.solr.cloud.api.collections.CategoryRoutedAlias

public class CategoryRoutedAlias extends RoutedAlias
  • Field Details

    • UNINITIALIZED

      public static final String UNINITIALIZED
      See Also:
    • ROUTER_MAX_CARDINALITY

      public static final String ROUTER_MAX_CARDINALITY
      See Also:
    • REQUIRED_ROUTER_PARAMS

      public static final Set<String> REQUIRED_ROUTER_PARAMS
      Parameters required for creating a category routed alias
    • ROUTER_MUST_MATCH

      public static final String ROUTER_MUST_MATCH
      See Also:
    • OPTIONAL_ROUTER_PARAMS

      public static final Set<String> OPTIONAL_ROUTER_PARAMS
      Optional parameters for creating a category routed alias excluding parameters for collection creation.
  • Method Details

    • updateParsedCollectionAliases

      public boolean updateParsedCollectionAliases(org.apache.solr.common.cloud.ZkStateReader zkStateReader, boolean contextualize)
      Description copied from class: RoutedAlias
      Ensure our parsed version of the alias collection list is up to date. If it was modified, return true. Note that this will return true if some other alias was modified or if properties were modified. These are spurious and the caller should be written to be tolerant of no material changes.
      Specified by:
      updateParsedCollectionAliases in class RoutedAlias
    • getAliasName

      public String getAliasName()
      Description copied from class: RoutedAlias
      The name of the alias. This name is used in place of a collection name for both queries and updates.
      Specified by:
      getAliasName in class RoutedAlias
      Returns:
      The name of the Alias.
    • getRouteField

      public String getRouteField()
    • getRoutedAliasType

      public org.apache.solr.client.solrj.request.RoutedAliasTypes getRoutedAliasType()
    • validateRouteValue

      public void validateRouteValue(AddUpdateCommand cmd) throws org.apache.solr.common.SolrException
      Description copied from class: RoutedAlias
      Check that the value we will be routing on is legal for this type of routed alias.
      Specified by:
      validateRouteValue in class RoutedAlias
      Parameters:
      cmd - the command containing the document
      Throws:
      org.apache.solr.common.SolrException
    • computeInitialCollectionName

      public String computeInitialCollectionName()
    • getAliasMetadata

      public Map<String,String> getAliasMetadata()
    • getRequiredParams

      public Set<String> getRequiredParams()
      Specified by:
      getRequiredParams in class RoutedAlias
    • getOptionalParams

      public Set<String> getOptionalParams()
      Specified by:
      getOptionalParams in class RoutedAlias
    • findCandidateGivenValue

      public org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd)
    • getHeadCollectionIfOrdered

      protected String getHeadCollectionIfOrdered(AddUpdateCommand cmd)
      Description copied from class: RoutedAlias
      Calculate the head collection (i.e. the most recent one for a TRA) if this routed alias has an implicit order, or if the collection is unordered return the appropriate collection name for the value in the current document. This method should never return null.
      Specified by:
      getHeadCollectionIfOrdered in class RoutedAlias
    • calculateActions

      protected List<RoutedAlias.Action> calculateActions(String targetCol)
      Description copied from class: RoutedAlias
      Determine the combination of adds/deletes implied by the arrival of a document destined for the specified collection.
      Specified by:
      calculateActions in class RoutedAlias
      Parameters:
      targetCol - the collection for which a document is destined.
      Returns:
      A list of actions across the DRA.