public class DefaultElasticsearchSchemaValidator extends Object implements ElasticsearchSchemaValidator, Startable, Stoppable
ElasticsearchSchemaValidator
implementation.
Important implementation note: unexpected attributes (i.e. those not mapped to a field in TypeMapping)
are totally ignored. This allows users to leverage Elasticsearch features that are not supported in
Hibernate Search, by setting those attributes manually.Constructor and Description |
---|
DefaultElasticsearchSchemaValidator() |
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 |
start(Properties properties,
BuildContext context) |
void |
stop() |
void |
validate(IndexMetadata expectedIndexMetadata,
ExecutionOptions executionOptions)
Retrieves and validate actual index metadata, throwing an exception if validation fails.
|
public void start(Properties properties, BuildContext context)
public void validate(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaValidator
The metadata mainly contain the type mappings and the index settings.
validate
in interface ElasticsearchSchemaValidator
expectedIndexMetadata
- The expected metadata, generated by Hibernate Search.executionOptions
- The execution options, giving more context information.public boolean isSettingsValid(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaValidator
isSettingsValid
in interface ElasticsearchSchemaValidator
expectedIndexMetadata
- The expected metadata, generated by Hibernate Search.executionOptions
- The execution options, giving more context information.Copyright © 2006–2017 Hibernate. All rights reserved.