public class CategoryRoutedAlias extends RoutedAlias
RoutedAlias.Action
Modifier and Type | Field and Description |
---|---|
static Set<String> |
OPTIONAL_ROUTER_PARAMS
Optional parameters for creating a category routed alias excluding parameters for collection creation.
|
static Set<String> |
REQUIRED_ROUTER_PARAMS
Parameters required for creating a category routed alias
|
static String |
ROUTER_MAX_CARDINALITY |
static String |
ROUTER_MUST_MATCH |
static String |
UNINITIALIZED |
CREATE_COLLECTION_PREFIX, MINIMAL_REQUIRED_PARAMS, ROUTED_ALIAS_NAME_CORE_PROP, ROUTER_FIELD, ROUTER_TYPE_NAME
Modifier and Type | Method and Description |
---|---|
protected List<RoutedAlias.Action> |
calculateActions(String targetCol)
Determine the combination of adds/deletes implied by the arrival of a document destined for the
specified collection.
|
String |
computeInitialCollectionName()
Create the initial collection for this RoutedAlias if applicable.
|
org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection |
findCandidateGivenValue(AddUpdateCommand cmd) |
Map<String,String> |
getAliasMetadata() |
String |
getAliasName()
The name of the alias.
|
protected String |
getHeadCollectionIfOrdered(AddUpdateCommand cmd)
Calculate the head collection (i.e.
|
Set<String> |
getOptionalParams() |
Set<String> |
getRequiredParams() |
RoutedAliasTypes |
getRoutedAliasType() |
String |
getRouteField() |
boolean |
updateParsedCollectionAliases(ZkStateReader zkStateReader,
boolean contextualize)
Ensure our parsed version of the alias collection list is up to date.
|
void |
validateRouteValue(AddUpdateCommand cmd)
Check that the value we will be routing on is legal for this type of routed alias.
|
createCollectionsIfRequired, fromProps, newAliasMustExistException
public static final String UNINITIALIZED
public static final String ROUTER_MAX_CARDINALITY
public static final Set<String> REQUIRED_ROUTER_PARAMS
public static final String ROUTER_MUST_MATCH
public boolean updateParsedCollectionAliases(ZkStateReader zkStateReader, boolean contextualize)
RoutedAlias
updateParsedCollectionAliases
in class RoutedAlias
public String getAliasName()
RoutedAlias
getAliasName
in class RoutedAlias
public String getRouteField()
public RoutedAliasTypes getRoutedAliasType()
public void validateRouteValue(AddUpdateCommand cmd) throws SolrException
RoutedAlias
validateRouteValue
in class RoutedAlias
cmd
- the command containing the documentSolrException
public String computeInitialCollectionName()
RoutedAlias
Routed Aliases do not aggregate existing collections, instead they create collections on the fly. If the initial collection can be determined from initialization parameters it should be calculated here.
public Set<String> getRequiredParams()
getRequiredParams
in class RoutedAlias
public Set<String> getOptionalParams()
getOptionalParams
in class RoutedAlias
public org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd)
protected String getHeadCollectionIfOrdered(AddUpdateCommand cmd)
RoutedAlias
getHeadCollectionIfOrdered
in class RoutedAlias
protected List<RoutedAlias.Action> calculateActions(String targetCol)
RoutedAlias
calculateActions
in class RoutedAlias
targetCol
- the collection for which a document is destined.Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.