Package com.dotcms.repackage.org.elasticsearch.action.admin.cluster.state

Examples of com.dotcms.repackage.org.elasticsearch.action.admin.cluster.state.ClusterStateRequest


     * @throws ElasticSearchException
     * @throws IOException
     */
    public  String getMapping(String index, String type) throws ElasticSearchException, IOException{

      return new ESClient().getClient().admin().cluster().state(new ClusterStateRequest())
        .actionGet().getState().metaData().indices()
        .get(index).mapping(type).source().string();

    }
View Full Code Here


    public Map<String,String> getIndexAlias(String[] indexNames) {
        Map<String,String> alias=new HashMap<String,String>();
        try{
            Client client=new ESClient().getClient();
            ClusterStateRequest clusterStateRequest = Requests.clusterStateRequest()
                    .filterRoutingTable(true)
                    .filterNodes(true)
                    .filteredIndices(indexNames);
            MetaData md=client.admin().cluster().state(clusterStateRequest)
                                                .actionGet(30000).getState().metaData();
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.elasticsearch.action.admin.cluster.state.ClusterStateRequest

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.