Package com.dotcms.repackage.org.elasticsearch.action.admin.indices.alias

Examples of com.dotcms.repackage.org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest


    public void createAlias(String indexName, String alias) {
        try{
            // checking for existing alias
            if(getAliasToIndexMap(APILocator.getSiteSearchAPI().listIndices()).get(alias)==null) {
                Client client=new ESClient().getClient();
                IndicesAliasesRequest req=new IndicesAliasesRequest();
                req.addAlias(indexName, alias);
                client.admin().indices().aliases(req).actionGet(30000L);
            }
         } catch (Exception e) {
             Logger.error(ESIndexAPI.class, e.getMessage(), e);
             throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest

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.