org.hibernate.search.elasticsearch.schema.impl

## Class DefaultElasticsearchSchemaMigrator

- java.lang.Object
- - org.hibernate.search.elasticsearch.schema.impl.DefaultElasticsearchSchemaMigrator

- All Implemented Interfaces:
    ElasticsearchSchemaMigrator

      public class DefaultElasticsearchSchemaMigrator
      extends Object
      implements ElasticsearchSchemaMigrator

  The default `ElasticsearchSchemaMigrator` implementation.
  Author:
    Gunnar Morling, Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultElasticsearchSchemaMigrator(ElasticsearchSchemaAccessor schemaAccessor, ElasticsearchSchemaValidator schemaValidator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `migrate(IndexMetadata indexMetadata, ExecutionOptions executionOptions)` Update the existing schema to match the given metadata: for each mapping, update the existing mappings and analyzer definitions to match the expected ones, throwing `SearchException` if an incompatible attribute is detected.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultElasticsearchSchemaMigrator

          public DefaultElasticsearchSchemaMigrator(ElasticsearchSchemaAccessor schemaAccessor,
                                                    ElasticsearchSchemaValidator schemaValidator)

  - ### Method Detail

    - #### migrate

          public void migrate(IndexMetadata indexMetadata,
                              ExecutionOptions executionOptions)

      Description copied from interface: `ElasticsearchSchemaMigrator`
      Update the existing schema to match the given metadata: for each mapping, update the existing mappings and analyzer definitions to match the expected ones, throwing `SearchException` if an incompatible attribute is detected.

      The index is expected to already exist.

      Specified by:
        `migrate` in interface `ElasticsearchSchemaMigrator`
      Parameters:
        `indexMetadata` - The expected index metadata.
        `executionOptions` - The execution options, giving more context information.

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved