Class IndexMetadataVerifier

java.lang.Object
org.elasticsearch.cluster.metadata.IndexMetadataVerifier

public class IndexMetadataVerifier
extends java.lang.Object
This service is responsible for verifying index metadata when an index is introduced to the cluster, for example when restarting nodes, importing dangling indices, or restoring an index from a snapshot repository. It performs the following: - Verifies the index version is not too old. - Tries to parse the mappings to catch compatibility bugs early. - Identifies unknown and invalid settings and archives them.
  • Constructor Summary

    Constructors
    Constructor Description
    IndexMetadataVerifier​(Settings settings, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, MapperRegistry mapperRegistry, IndexScopedSettings indexScopedSettings, ScriptService scriptService)  
  • Method Summary

    Modifier and Type Method Description
    IndexMetadata verifyIndexMetadata​(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion)
    Checks that the index can be upgraded to the current version of the master node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • verifyIndexMetadata

      public IndexMetadata verifyIndexMetadata​(IndexMetadata indexMetadata, Version minimumIndexCompatibilityVersion)
      Checks that the index can be upgraded to the current version of the master node.

      If the index does not need upgrade it returns the index metadata unchanged, otherwise it returns a modified index metadata. If index cannot be updated the method throws an exception.