public class DefaultElasticsearchSchemaCreator extends Object implements ElasticsearchSchemaCreator, Startable, Stoppable
ElasticsearchSchemaCreator implementation.| Constructor and Description |
|---|
DefaultElasticsearchSchemaCreator() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIndexExists(String 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.
|
void |
start(Properties properties,
BuildContext context) |
void |
stop() |
public void start(Properties properties, BuildContext context)
public void createIndex(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreatorcreateIndex in interface ElasticsearchSchemaCreatorindexMetadata - The expected index metadata.public boolean createIndexIfAbsent(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreatorcreateIndexIfAbsent in interface ElasticsearchSchemaCreatorindexMetadata - The expected index metadata.true if the index had to be created, false otherwise.public void checkIndexExists(String indexName, ExecutionOptions executionOptions)
ElasticsearchSchemaCreatorcheckIndexExists in interface ElasticsearchSchemaCreatorindexName - The expected index name.public void createMappings(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreatorMappings are supposed to be absent from the index.
createMappings in interface ElasticsearchSchemaCreatorindexMetadata - The expected index metadata.Copyright © 2006–2016 Hibernate. All rights reserved.