Package org.elasticsearch.action.admin.indices.close

Examples of org.elasticsearch.action.admin.indices.close.CloseIndexResponse


    @Test
    public void testCloseIndexNoAcknowledgement() {
        createIndex("test");
        ensureGreen();

        CloseIndexResponse closeIndexResponse = client().admin().indices().prepareClose("test").setTimeout("0s").get();
        assertThat(closeIndexResponse.isAcknowledged(), equalTo(false));
    }
View Full Code Here


    @Test
    public void testOpenIndexNoAcknowledgement() {
        createIndex("test");
        ensureGreen();

        CloseIndexResponse closeIndexResponse = client().admin().indices().prepareClose("test").execute().actionGet();
        assertThat(closeIndexResponse.isAcknowledged(), equalTo(true));

        OpenIndexResponse openIndexResponse = client().admin().indices().prepareOpen("test").setTimeout("0s").get();
        assertThat(openIndexResponse.isAcknowledged(), equalTo(false));
        ensureGreen("test"); // make sure that recovery from disk has completed, so that check index doesn't fail.
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.close.CloseIndexResponse

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.