Package org.elasticsearch.action.admin.indices.settings.put

Examples of org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse


    public void gettingStatisticsShouldWork() throws Exception {
        // needed to make sure that we hit the already queried shards for stats, the other are empty
        Settings settings = settingsBuilder()
                .put("index.number_of_replicas", 0)
                .build();
        UpdateSettingsResponse response = client().admin().indices().prepareUpdateSettings(index).setSettings(settings).get();
        assertThat(response.isAcknowledged(), is(true));

        List<Map<String, Object>> products = createProducts("ProductName",
                "BMW 318", "BMW 528", "BMW M3", "the BMW 320", "VW Jetta");
        indexProducts(products);
View Full Code Here


    }

    @Test
    public void testUpdateSettingsNoAcknowledgement() {
        createIndex("test");
        UpdateSettingsResponse updateSettingsResponse = client().admin().indices().prepareUpdateSettings("test").setTimeout("0s")
                .setSettings(ImmutableSettings.builder().put("refresh_interval", 9999)).get();
        assertThat(updateSettingsResponse.isAcknowledged(), equalTo(false));
    }
View Full Code Here

        HashMap<String, Object> newSettings = new HashMap<>();
        newSettings.put(IndexMetaData.SETTING_READ_ONLY, value);

        UpdateSettingsRequestBuilder settingsRequest = client().admin().indices().prepareUpdateSettings(index);
        settingsRequest.setSettings(newSettings);
        UpdateSettingsResponse settingsResponse = settingsRequest.execute().actionGet();
        assertThat(settingsResponse, notNullValue());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse

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.