org.hibernate.search.elasticsearch.schema.impl

## Interface ElasticsearchSchemaCreator

- All Known Implementing Classes:
    DefaultElasticsearchSchemaCreator

      public interface ElasticsearchSchemaCreator

  An object responsible for creating an index and its mappings based on provided metadata.
  Author:
    Yoann Rodiere

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkIndexExists(URLEncodedString indexname, ExecutionOptions executionOptions)` Checks that an index already exists.
    `void` | `createIndex(IndexMetadata indexMetadata, ExecutionOptions executionOptions)` Create an index.
    `boolean` | `createIndexIfAbsent(IndexMetadata indexMetadata, ExecutionOptions executionOptions)` Create an index, but only if the index doesn't already exist.
    `void` | `createMappings(IndexMetadata indexMetadata, ExecutionOptions executionOptions)` Create mappings on a supposedly existing index.

- - ### Method Detail

    - #### createIndex

          void createIndex(IndexMetadata indexMetadata,
                           ExecutionOptions executionOptions)

      Create an index.
      Parameters:
        `indexMetadata` - The expected index metadata.
        `executionOptions` - The execution options, giving more context information.
      Throws:
        `SearchException` - If an error occurs.

    - #### createIndexIfAbsent

          boolean createIndexIfAbsent(IndexMetadata indexMetadata,
                                      ExecutionOptions executionOptions)

      Create an index, but only if the index doesn't already exist.
      Parameters:
        `indexMetadata` - The expected index metadata.
        `executionOptions` - The execution options, giving more context information.
      Returns:
        `true` if the index had to be created, `false` otherwise.
      Throws:
        `SearchException` - If an error occurs.

    - #### checkIndexExists

          void checkIndexExists(URLEncodedString indexname,
                                ExecutionOptions executionOptions)

      Checks that an index already exists.
      Parameters:
        `indexname` - The expected index name.
        `executionOptions` - The execution options, giving more context information.
      Throws:
        `SearchException` - If the index doesn't exist, or if an error occurs.

    - #### createMappings

          void createMappings(IndexMetadata indexMetadata,
                              ExecutionOptions executionOptions)

      Create mappings on a supposedly existing index.

      Mappings are supposed to be absent from the index.

      Parameters:
        `indexMetadata` - The expected index metadata.
        `executionOptions` - The execution options, giving more context information.
      Throws:
        `SearchException` - If an error occurs.

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