Search in sources :

Example 1 with IndexCreationException

use of org.opensearch.indices.IndexCreationException in project OpenSearch by opensearch-project.

the class MetadataCreateIndexService method validateIndexSettings.

public void validateIndexSettings(String indexName, final Settings settings, final boolean forbidPrivateIndexSettings) throws IndexCreationException {
    List<String> validationErrors = getIndexSettingsValidationErrors(settings, forbidPrivateIndexSettings);
    if (validationErrors.isEmpty() == false) {
        ValidationException validationException = new ValidationException();
        validationException.addValidationErrors(validationErrors);
        throw new IndexCreationException(indexName, validationException);
    }
}
Also used : ValidationException(org.opensearch.common.ValidationException) IndexCreationException(org.opensearch.indices.IndexCreationException)

Aggregations

ValidationException (org.opensearch.common.ValidationException)1 IndexCreationException (org.opensearch.indices.IndexCreationException)1