Examples of PutWarmerResponse


Examples of org.elasticsearch.action.admin.indices.warmer.put.PutWarmerResponse

    public void testPutWarmerNoAcknowledgement() throws InterruptedException {
        createIndex("test");
        // make sure one shard is started so the search during put warmer will not fail
        index("test", "type", "1", "f", 1);

        PutWarmerResponse putWarmerResponse = client().admin().indices().preparePutWarmer("custom_warmer").setTimeout("0s")
                .setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery()))
                .get();
        assertThat(putWarmerResponse.isAcknowledged(), equalTo(false));
        /* Since we don't wait for the ack here we have to wait until the search request has been executed from the master
         * otherwise the test infra might have already deleted the index and the search request fails on all shards causing
         * the test to fail too. We simply wait until the the warmer has been installed and also clean it up afterwards.*/
        assertTrue(awaitBusy(new Predicate<Object>() {
            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.