Examples of prepareCreate()


Examples of com.dotcms.repackage.org.elasticsearch.client.IndicesAdminClient.prepareCreate()

    Map map = new ObjectMapper().readValue(settings, LinkedHashMap.class);
    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);
View Full Code Here

Examples of com.dotcms.repackage.org.elasticsearch.client.IndicesAdminClient.prepareCreate()

      settings = getDefaultIndexSettings(shards);
    }


        // create actual index
    iac.prepareCreate(indexName).setSettings(settings).addMapping(type, mapping).execute();

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

    return null;
View Full Code Here

Examples of de.mhus.lib.adb.IRelationObject.prepareCreate()

  }

  public void prepareCreate(Object object) throws Exception {
    IRelationObject rel = getRelationObject(object);
    if (rel != null)
      rel.prepareCreate();
  }

  public void created(DbConnection con,Object object) throws Exception {
    IRelationObject rel = getRelationObject(object);
    if (rel != null)
View Full Code Here

Examples of de.mhus.lib.adb.model.Table.prepareCreate()

    if (c == null)
      throw new MException("class definition not found in schema",registryName);
   
    try {
      // prepare object
      c.prepareCreate(object);
      schema.doPreCreate(c,object,con,this);
     
      //save object
   
      c.createObject(con,object);
View Full Code Here

Examples of org.elasticsearch.client.IndicesAdminClient.prepareCreate()

            // ok if the index didn't exist
        }

        // create mappings
        IndicesAdminClient admin = client.admin().indices();
        admin.prepareCreate(indexName).addMapping("doc", "x", "type=long", "y", "type=double");

        client.admin().cluster().prepareHealth(indexName).setWaitForGreenStatus().setTimeout("10s").execute().actionGet();
        return client;
    }
View Full Code Here

Examples of org.elasticsearch.client.IndicesAdminClient.prepareCreate()

      IOException {

    // Make sure the site index exists
    try {
      IndicesAdminClient indexAdmin = nodeClient.admin().indices();
      CreateIndexRequestBuilder siteIdxRequest = indexAdmin.prepareCreate(site.getIdentifier());
      logger.debug("Trying to create site index for '{}'", site.getIdentifier());
      CreateIndexResponse siteidxResponse = siteIdxRequest.execute().actionGet();
      if (!siteidxResponse.acknowledged()) {
        throw new ContentRepositoryException("Unable to create site index for '" + site.getIdentifier() + "'");
      }
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.prepareCreate()

                        Engine.Index index = indexShard.prepareIndex(sourceToParse).version(indexRequest.version()).versionType(indexRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
                        indexShard.index(index);
                        version = index.version();
                        op = index;
                    } else {
                        Engine.Create create = indexShard.prepareCreate(sourceToParse).version(indexRequest.version()).versionType(indexRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
                        indexShard.create(create);
                        version = create.version();
                        op = create;
                    }
                    // update the version on request so it will happen on the replicas
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.prepareCreate()

                            .routing(indexRequest.routing()).parent(indexRequest.parent());
                    if (indexRequest.opType() == IndexRequest.OpType.INDEX) {
                        Engine.Index index = indexShard.prepareIndex(sourceToParse).version(indexRequest.version()).origin(Engine.Operation.Origin.REPLICA);
                        indexShard.index(index);
                    } else {
                        Engine.Create create = indexShard.prepareCreate(sourceToParse).version(indexRequest.version()).origin(Engine.Operation.Origin.REPLICA);
                        indexShard.create(create);
                    }
                } catch (Exception e) {
                    // ignore, we are on backup
                }
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.prepareCreate()

                    .origin(Engine.Operation.Origin.PRIMARY);
            indexShard.index(index);
            version = index.version();
            op = index;
        } else {
            Engine.Create create = indexShard.prepareCreate(sourceToParse)
                    .version(request.version())
                    .versionType(request.versionType())
                    .origin(Engine.Operation.Origin.PRIMARY);
            indexShard.create(create);
            version = create.version();
View Full Code Here

Examples of org.elasticsearch.index.shard.service.IndexShard.prepareCreate()

            Engine.Index index = indexShard.prepareIndex(sourceToParse)
                    .version(request.version())
                    .origin(Engine.Operation.Origin.REPLICA);
            indexShard.index(index);
        } else {
            Engine.Create create = indexShard.prepareCreate(sourceToParse)
                    .version(request.version())
                    .origin(Engine.Operation.Origin.REPLICA);
            indexShard.create(create);
        }
        if (request.refresh()) {
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.