Package org.elasticsearch.indices

Examples of org.elasticsearch.indices.IndexTemplateMissingException


    public void removeTemplate(final RemoveRequest request, final RemoveListener listener) {
        clusterService.submitStateUpdateTask("remove-index-template [" + request.name + "]", new ProcessedClusterStateUpdateTask() {
            @Override public ClusterState execute(ClusterState currentState) {
                if (!currentState.metaData().templates().containsKey(request.name)) {
                    listener.onFailure(new IndexTemplateMissingException(request.name));
                    return currentState;
                }
                MetaData.Builder metaData = MetaData.builder().metaData(currentState.metaData())
                        .remoteTemplate(request.name);
View Full Code Here


                    // if its a match all pattern, and no templates are found (we have none), don't
                    // fail with index missing...
                    if (Regex.isMatchAllPattern(request.name)) {
                        return currentState;
                    }
                    throw new IndexTemplateMissingException(request.name);
                }
                MetaData.Builder metaData = MetaData.builder(currentState.metaData());
                for (String templateName : templateNames) {
                    metaData.removeTemplate(templateName);
                }
View Full Code Here

TOP

Related Classes of org.elasticsearch.indices.IndexTemplateMissingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.