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

Examples of com.dotcms.repackage.org.elasticsearch.action.admin.indices.settings.UpdateSettingsRequest


  public  void moveIndexToLocalNode(String index) throws IOException {
        Client client=new ESClient().getClient();
//        String nodeName="dotCMS_" + Config.getStringProperty("DIST_INDEXATION_SERVER_ID");
        String nodeName="dotCMS_" + APILocator.getServerAPI().readServerId();
        UpdateSettingsResponse resp=client.admin().indices().updateSettings(
          new UpdateSettingsRequest(index).settings(
                jsonBuilder().startObject()
                     .startObject("index")
                        .field("number_of_replicas",0)
                        .field("routing.allocation.include._name",nodeName)
                     .endObject()
View Full Code Here


   */
    public  void moveIndexBackToCluster(String index) throws IOException {
        Client client=new ESClient().getClient();
        int nreplicas=Config.getIntProperty("es.index.number_of_replicas",0);
        UpdateSettingsResponse resp=client.admin().indices().updateSettings(
          new UpdateSettingsRequest(index).settings(
                jsonBuilder().startObject()
                     .startObject("index")
                        .field("number_of_replicas",nreplicas)
                        .field("routing.allocation.include._name","*")
                     .endObject()
View Full Code Here

                                            put( "script.native.related.type", RelationshipSortOrderScriptFactory.class.getCanonicalName() ).build()
                            ).build().start();

                    try {
                        UpdateSettingsResponse resp = _nodeInstance.client().admin().indices().updateSettings(
                                new UpdateSettingsRequest().settings(
                                        jsonBuilder().startObject()
                                                .startObject( "index" )
                                                .field( "auto_expand_replicas", "0-all" )
                                                .endObject()
                                                .endObject().string()
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.elasticsearch.action.admin.indices.settings.UpdateSettingsRequest

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.