Examples of IndicesAliasesResponse


Examples of org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse

   */
    private void createAlias(String alias, String index) throws Exception {
    if (logger.isTraceEnabled()) logger.trace("createAlias("+alias+","+index+")");
    checkClient();
   
    IndicesAliasesResponse response = client.admin().indices().prepareAliases().addAlias(index, alias).execute().actionGet();
    if (!response.isAcknowledged()) throw new Exception("Could not define alias [" + alias + "] for index [" + index + "].");
    if (logger.isTraceEnabled()) logger.trace("/createAlias("+alias+","+index+")");
  }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse

    @Test
    public void testIndicesAliasesNoAcknowledgement() {
        createIndex("test");

        IndicesAliasesResponse indicesAliasesResponse = client().admin().indices().prepareAliases().addAlias("test", "alias").setTimeout("0s").get();
        assertThat(indicesAliasesResponse.isAcknowledged(), equalTo(false));
    }
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.