org.elasticsearch.client.action.admin.indices.create
Class CreateIndexRequestBuilder

java.lang.Object
  extended by org.elasticsearch.client.action.admin.indices.support.BaseIndicesRequestBuilder<CreateIndexRequest,CreateIndexResponse>
      extended by org.elasticsearch.client.action.admin.indices.create.CreateIndexRequestBuilder
All Implemented Interfaces:
RequestBuilder<CreateIndexRequest,CreateIndexResponse>

public class CreateIndexRequestBuilder
extends BaseIndicesRequestBuilder<CreateIndexRequest,CreateIndexResponse>


Field Summary
 
Fields inherited from class org.elasticsearch.client.action.admin.indices.support.BaseIndicesRequestBuilder
client, request
 
Constructor Summary
CreateIndexRequestBuilder(IndicesAdminClient indicesClient, java.lang.String index)
           
 
Method Summary
 CreateIndexRequestBuilder addMapping(java.lang.String type, java.lang.String source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder addMapping(java.lang.String type, XContentBuilder source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder cause(java.lang.String cause)
          The cause for this index creation.
protected  void doExecute(ActionListener<CreateIndexResponse> listener)
           
 CreateIndexRequestBuilder mapping(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder setMasterNodeTimeout(java.lang.String timeout)
          Sets the master node timeout in case the master has not yet been discovered.
 CreateIndexRequestBuilder setMasterNodeTimeout(TimeValue timeout)
          Sets the master node timeout in case the master has not yet been discovered.
 CreateIndexRequestBuilder setSettings(java.util.Map<java.lang.String,java.lang.Object> source)
          The settings to crete the index with (either json/yaml/properties format)
 CreateIndexRequestBuilder setSettings(Settings.Builder settings)
          The settings to created the index with.
 CreateIndexRequestBuilder setSettings(Settings settings)
          The settings to created the index with.
 CreateIndexRequestBuilder setSettings(java.lang.String source)
          The settings to crete the index with (either json/yaml/properties format)
 CreateIndexRequestBuilder setTimeout(java.lang.String timeout)
          Timeout to wait for the index creation to be acknowledged by current cluster nodes.
 CreateIndexRequestBuilder setTimeout(TimeValue timeout)
          Timeout to wait for the index creation to be acknowledged by current cluster nodes.
 
Methods inherited from class org.elasticsearch.client.action.admin.indices.support.BaseIndicesRequestBuilder
execute, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateIndexRequestBuilder

public CreateIndexRequestBuilder(IndicesAdminClient indicesClient,
                                 java.lang.String index)
Method Detail

setSettings

public CreateIndexRequestBuilder setSettings(Settings settings)
The settings to created the index with.


setSettings

public CreateIndexRequestBuilder setSettings(Settings.Builder settings)
The settings to created the index with.


setSettings

public CreateIndexRequestBuilder setSettings(java.lang.String source)
The settings to crete the index with (either json/yaml/properties format)


setSettings

public CreateIndexRequestBuilder setSettings(java.util.Map<java.lang.String,java.lang.Object> source)
The settings to crete the index with (either json/yaml/properties format)


addMapping

public CreateIndexRequestBuilder addMapping(java.lang.String type,
                                            java.lang.String source)
Adds mapping that will be added when the index gets created.

Parameters:
type - The mapping type
source - The mapping source

cause

public CreateIndexRequestBuilder cause(java.lang.String cause)
The cause for this index creation.


addMapping

public CreateIndexRequestBuilder addMapping(java.lang.String type,
                                            XContentBuilder source)
Adds mapping that will be added when the index gets created.

Parameters:
type - The mapping type
source - The mapping source

mapping

public CreateIndexRequestBuilder mapping(java.lang.String type,
                                         java.util.Map<java.lang.String,java.lang.Object> source)
Adds mapping that will be added when the index gets created.

Parameters:
type - The mapping type
source - The mapping source

setTimeout

public CreateIndexRequestBuilder setTimeout(TimeValue timeout)
Timeout to wait for the index creation to be acknowledged by current cluster nodes. Defaults to 10s.


setTimeout

public CreateIndexRequestBuilder setTimeout(java.lang.String timeout)
Timeout to wait for the index creation to be acknowledged by current cluster nodes. Defaults to 10s.


setMasterNodeTimeout

public CreateIndexRequestBuilder setMasterNodeTimeout(TimeValue timeout)
Sets the master node timeout in case the master has not yet been discovered.


setMasterNodeTimeout

public CreateIndexRequestBuilder setMasterNodeTimeout(java.lang.String timeout)
Sets the master node timeout in case the master has not yet been discovered.


doExecute

protected void doExecute(ActionListener<CreateIndexResponse> listener)
Specified by:
doExecute in class BaseIndicesRequestBuilder<CreateIndexRequest,CreateIndexResponse>