Package org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest

Examples of org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions


        }

        IndicesAliasesRequest indicesAliasesRequest = new IndicesAliasesRequest();
        indicesAliasesRequest.timeout(request.paramAsTime("timeout", indicesAliasesRequest.timeout()));
        String[] aliases = new String[]{alias};
        IndicesAliasesRequest.AliasActions aliasAction = new AliasActions(AliasAction.Type.ADD, indices, aliases);
        indicesAliasesRequest.addAliasAction(aliasAction);
        indicesAliasesRequest.masterNodeTimeout(request.paramAsTime("master_timeout", indicesAliasesRequest.masterNodeTimeout()));


        if (routing != null) {
            aliasAction.routing(routing);
        }
        if (searchRouting != null) {
            aliasAction.searchRouting(searchRouting);
        }
        if (indexRouting != null) {
            aliasAction.indexRouting(indexRouting);
        }
        if (filter != null) {
            aliasAction.filter(filter);
        }
        client.admin().indices().aliases(indicesAliasesRequest, new AcknowledgedRestListener<IndicesAliasesResponse>(channel));
    }
View Full Code Here


     * @param index  The index
     * @param alias  The alias
     * @param filter The filter
     */
    public IndicesAliasesRequestBuilder addAlias(String index, String alias, String filter) {
        AliasActions action = new AliasActions(AliasAction.Type.ADD, index, alias).filter(filter);
        request.addAliasAction(action);
        return this;
    }
View Full Code Here

     * @param indices       The indices
     * @param alias         The alias
     * @param filter The filter
     */
    public IndicesAliasesRequestBuilder addAlias(String indices[], String alias, String filter) {
        AliasActions action = new AliasActions(AliasAction.Type.ADD, indices, alias).filter(filter);
        request.addAliasAction(action);
        return this;
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions

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.