Enum Class IndexMode

java.lang.Object
java.lang.Enum<IndexMode>
org.elasticsearch.index.IndexMode
All Implemented Interfaces:
Serializable, Comparable<IndexMode>, Constable

public enum IndexMode extends Enum<IndexMode>
"Mode" that controls which behaviors and settings an index supports.

For the most part this class concentrates on validating settings and mappings. Most different behavior is controlled by forcing settings to be set or not set and by enabling extra fields in the mapping.

  • Enum Constant Details

    • STANDARD

      public static final IndexMode STANDARD
    • TIME_SERIES

      public static final IndexMode TIME_SERIES
  • Field Details

    • DEFAULT_TIME_SERIES_TIMESTAMP_MAPPING

      public static final CompressedXContent DEFAULT_TIME_SERIES_TIMESTAMP_MAPPING
  • Method Details

    • values

      public static IndexMode[] 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

      public static IndexMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getName

      public String getName()
    • validateMapping

      public abstract void validateMapping(MappingLookup lookup)
      Validate the mapping for this index.
    • validateAlias

      public abstract void validateAlias(@Nullable String indexRouting, @Nullable String searchRouting)
      Validate aliases targeting this index.
    • validateTimestampFieldMapping

      public abstract void validateTimestampFieldMapping(boolean isDataStream, MappingLookup mappingLookup) throws IOException
      validate timestamp mapping for this index.
      Throws:
      IOException
    • getDefaultMapping

      @Nullable public abstract CompressedXContent getDefaultMapping()
      Get default mapping for this index or null if there is none.
    • buildTimeSeriesIdFieldMapper

      public abstract MetadataFieldMapper buildTimeSeriesIdFieldMapper()
      Return an instance of the TimeSeriesIdFieldMapper that generates the _tsid field. The field mapper will be added to the list of the metadata field mappers for the index.
    • fromString

      public static IndexMode fromString(String value)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<IndexMode>