Examples of acknowledged()


Examples of org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse.acknowledged()

   */
  @Override
  public void clear() throws IOException {
    try {
      DeleteIndexResponse delete = nodeClient.admin().indices().delete(new DeleteIndexRequest()).actionGet();
      if (!delete.acknowledged())
        logger.error("Indices could not be deleted");
    } catch (Throwable t) {
      throw new IOException("Cannot clear index", t);
    }
   
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse.acknowledged()

        logger.info("Creating index [{}]", "test");
        client("server1").admin().indices().prepareCreate("test").execute().actionGet();

        // create a mapping
        PutMappingResponse putMappingResponse = client("server1").admin().indices().preparePutMapping("test").setType("type1").setSource(mappingSource()).execute().actionGet();
        assertThat(putMappingResponse.acknowledged(), equalTo(true));

        // verify that mapping is there
        ClusterStateResponse clusterState = client("server1").admin().cluster().state(clusterStateRequest()).actionGet();
        assertThat(clusterState.state().metaData().index("test").mapping("type1"), notNullValue());
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse.acknowledged()

        // Translog tests
        // create a mapping
        PutMappingResponse putMappingResponse = node.client().admin().indices().putMapping(putMappingRequest("test").type("type1")
                .source(mappingSource())).actionGet();
        assertThat(putMappingResponse.acknowledged(), equalTo(true));

        // verify that mapping is there
        ClusterStateResponse clusterState = node.client().admin().cluster().state(clusterStateRequest()).actionGet();
        assertThat(clusterState.state().metaData().index("test").mapping("type1"), notNullValue());
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse.acknowledged()

        "movie" }) {
      PutMappingRequest siteMappingRequest = new PutMappingRequest(site.getIdentifier());
      siteMappingRequest.source(loadMapping(type));
      siteMappingRequest.type(type);
      PutMappingResponse siteMappingResponse = nodeClient.admin().indices().putMapping(siteMappingRequest).actionGet();
      if (!siteMappingResponse.acknowledged()) {
        throw new ContentRepositoryException("Unable to install '" + type + "' mapping for index '" + site.getIdentifier() + "'");
      }
    }

    // See if the index version exists and check if it matches. The request will
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.