Package com.dotcms.repackage.org.elasticsearch.action.admin.indices.create

Examples of com.dotcms.repackage.org.elasticsearch.action.admin.indices.create.CreateIndexResponse


    return createContentIndex(indexName, 0);
  }
  @Override
  public synchronized boolean createContentIndex(String indexName, int shards) throws ElasticSearchException, IOException {

    CreateIndexResponse cir = iapi.createIndex(indexName, null, shards);
    int i = 0;
    while(!cir.isAcknowledged()){

      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        // TODO Auto-generated catch block
View Full Code Here


    iapi.delete(indexName);

    if(UtilMethods.isSet(indexName) && indexName.indexOf("sitesearch") > -1) {
      APILocator.getSiteSearchAPI().createSiteSearchIndex(indexName, alias, shards);
    } else {
      CreateIndexResponse res=createIndex(indexName, shards);

      try {
        int w=0;
        while(!res.isAcknowledged() && ++w<100)
          Thread.sleep(100);
      }
      catch(InterruptedException ex) {
        Logger.warn(this, ex.getMessage(), ex);
      }
View Full Code Here

    map.put("number_of_shards", shards);


        // create actual index
    CreateIndexRequestBuilder cirb = iac.prepareCreate(indexName).setSettings(map);
        CreateIndexResponse createIndexResponse = cirb.execute().actionGet();

        AdminLogger.log(this.getClass(), "createIndex",
                "Index created: " + indexName + " with shards: " + shards);

    return createIndexResponse;
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.elasticsearch.action.admin.indices.create.CreateIndexResponse

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.