Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Enum Class DynamicTemplate.MatchType
- All Implemented Interfaces:
Serializable
,Comparable<DynamicTemplate.MatchType>
,Constable
- Enclosing class:
- DynamicTemplate
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicTemplate.MatchType
fromString
(String value) abstract boolean
Whethervalue
matchesregex
.abstract void
Validatespattern
for the MatchType.static DynamicTemplate.MatchType
Returns the enum constant of this class with the specified name.static DynamicTemplate.MatchType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
DEFAULT is set when the user did not explicitly set a match_pattern in their dynamic_templates entry. DEFAULT uses the functionality of SIMPLE for matching, but does additional validation to detect whether the user appears to be using regex notation, in order to provide a warning. -
SIMPLE
-
REGEX
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromString
-
matches
Whethervalue
matchesregex
. -
validate
Validatespattern
for the MatchType.- Parameters:
pattern
- to validatetemplateName
- naming of the dynamic_template passed in (for use in warnings/error messages)- Throws:
IllegalArgumentException
- if the pattern is not valid
-