public class Elasticsearch2SchemaValidator extends Object implements ElasticsearchSchemaValidator
ElasticsearchSchemaValidator implementation for Elasticsearch 2.
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 |
|---|
Elasticsearch2SchemaValidator(ElasticsearchSchemaAccessor schemaAccessor) |
public Elasticsearch2SchemaValidator(ElasticsearchSchemaAccessor schemaAccessor)
public void validate(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaValidatorThe metadata mainly contain the type mappings and the index settings.
validate in interface ElasticsearchSchemaValidatorexpectedIndexMetadata - The expected metadata, generated by Hibernate Search.executionOptions - The execution options, giving more context information.public boolean isSettingsValid(IndexMetadata expectedIndexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaValidatorisSettingsValid in interface ElasticsearchSchemaValidatorexpectedIndexMetadata - The expected metadata, generated by Hibernate Search.executionOptions - The execution options, giving more context information.true if the actual settings are valid, false otherwise.protected String formatContextElement(org.hibernate.search.elasticsearch.schema.impl.ValidationContextType type, String name)
protected void validateAnalysisSettings(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, IndexSettings.Analysis expectedAnalysis, IndexSettings.Analysis actualAnalysis)
protected <T> void validateEqualWithDefault(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, String attributeName, T expectedValue, T actualValue, T defaultValueForNulls)
protected <T> void validateEqualWithDefault(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, String attributeName, Float expectedValue, Float actualValue, float delta, Float defaultValueForNulls)
protected <T> void validateEqualWithDefault(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, String attributeName, Double expectedValue, Double actualValue, double delta, Double defaultValueForNulls)
protected <T> void validateFormatWithDefault(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, String attributeName, List<String> expectedValue, List<String> actualValue, List<String> defaultValueForNulls)
protected final void validateJsonPrimitive(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, DataType type, String attributeName, com.google.gson.JsonPrimitive expectedValue, com.google.gson.JsonPrimitive actualValue)
protected void doValidateJsonPrimitive(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, DataType type, String attributeName, com.google.gson.JsonPrimitive expectedValue, com.google.gson.JsonPrimitive actualValue)
protected <T> void validateAll(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, org.hibernate.search.elasticsearch.schema.impl.ValidationContextType type, String messageIfMissing, org.hibernate.search.elasticsearch.schema.impl.Elasticsearch2SchemaValidator.Validator<T> validator, Map<String,T> expectedMap, Map<String,T> actualMap)
protected void validateIndexOptions(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, PropertyMapping expectedMapping, PropertyMapping actualMapping)
protected void validateAnalyzerOptions(org.hibernate.search.elasticsearch.schema.impl.ValidationErrorCollector errorCollector, PropertyMapping expectedMapping, PropertyMapping actualMapping)
Copyright © 2006–2017 Hibernate. All rights reserved.