org.hibernate.search.elasticsearch.schema.impl

## Interface ElasticsearchSchemaValidator

- All Known Implementing Classes:
    Elasticsearch2SchemaValidator, Elasticsearch50SchemaValidator, Elasticsearch52SchemaValidator

      public interface ElasticsearchSchemaValidator

  An object responsible for validating type mappings retrieved from an existing Elasticsearch instance against Hibernate Search-generated type mappings.
  Author:
    Yoann Rodiere

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isSettingsValid(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)` Retrieves and validate actual index settings, returning a boolean indicating whether the actual settings are valid or not.
    `void` | `validate(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)` Retrieves and validate actual index metadata, throwing an exception if validation fails.

- - ### Method Detail

    - #### validate

          void validate(IndexMetadata expectedIndexMetadata,
                        ExecutionOptions executionOptions)

      Retrieves and validate actual index metadata, throwing an exception if validation fails.

      The metadata mainly contain the type mappings and the index settings.

      Parameters:
        `expectedIndexMetadata` - The expected metadata, generated by Hibernate Search.
        `executionOptions` - The execution options, giving more context information.
      Throws:
        `ElasticsearchSchemaValidationException` - If a validation error occurs.

    - #### isSettingsValid

          boolean isSettingsValid(IndexMetadata expectedIndexMetadata,
                                  ExecutionOptions executionOptions)

      Retrieves and validate actual index settings, returning a boolean indicating whether the actual settings are valid or not.
      Parameters:
        `expectedIndexMetadata` - The expected metadata, generated by Hibernate Search.
        `executionOptions` - The execution options, giving more context information.
      Returns:
        `true` if the actual settings are valid, `false` otherwise.
      Throws:
        `ElasticsearchSchemaValidationException` - If a validation error occurs.

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