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

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

public class CreateIndexRequestBuilder
extends BaseIndicesRequestBuilder<CreateIndexRequest,CreateIndexResponse>


Field Summary
 
Fields inherited from class org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder
client, request
 
Constructor Summary
CreateIndexRequestBuilder(IndicesAdminClient indicesClient)
           
CreateIndexRequestBuilder(IndicesAdminClient indicesClient, String index)
           
 
Method Summary
 CreateIndexRequestBuilder addMapping(String type, Map<String,Object> source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder addMapping(String type, String source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder addMapping(String type, XContentBuilder source)
          Adds mapping that will be added when the index gets created.
 CreateIndexRequestBuilder cause(String cause)
          The cause for this index creation.
protected  void doExecute(ActionListener<CreateIndexResponse> listener)
           
 CreateIndexRequestBuilder setCustom(IndexMetaData.Custom custom)
           
 CreateIndexRequestBuilder setIndex(String index)
           
 CreateIndexRequestBuilder setMasterNodeTimeout(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(Map<String,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(String source)
          The settings to crete the index with (either json/yaml/properties format)
 CreateIndexRequestBuilder setSettings(XContentBuilder builder)
          Allows to set the settings using a json builder.
 CreateIndexRequestBuilder setSource(byte[] source)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setSource(byte[] source, int offset, int length)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setSource(BytesReference source)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setSource(Map<String,Object> source)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setSource(String source)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setSource(XContentBuilder source)
          Sets the settings and mappings as a single source.
 CreateIndexRequestBuilder setTimeout(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.action.admin.indices.support.BaseIndicesRequestBuilder
execute, execute, request
 
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)

CreateIndexRequestBuilder

public CreateIndexRequestBuilder(IndicesAdminClient indicesClient,
                                 String index)
Method Detail

setIndex

public CreateIndexRequestBuilder setIndex(String index)

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(XContentBuilder builder)
Allows to set the settings using a json builder.


setSettings

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


setSettings

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


addMapping

public CreateIndexRequestBuilder addMapping(String type,
                                            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(String cause)
The cause for this index creation.


addMapping

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

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

addMapping

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

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

setSource

public CreateIndexRequestBuilder setSource(String source)
Sets the settings and mappings as a single source.


setSource

public CreateIndexRequestBuilder setSource(BytesReference source)
Sets the settings and mappings as a single source.


setSource

public CreateIndexRequestBuilder setSource(byte[] source)
Sets the settings and mappings as a single source.


setSource

public CreateIndexRequestBuilder setSource(byte[] source,
                                           int offset,
                                           int length)
Sets the settings and mappings as a single source.


setSource

public CreateIndexRequestBuilder setSource(Map<String,Object> source)
Sets the settings and mappings as a single source.


setCustom

public CreateIndexRequestBuilder setCustom(IndexMetaData.Custom custom)

setSource

public CreateIndexRequestBuilder setSource(XContentBuilder source)
Sets the settings and mappings as a single 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(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(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>


Copyright © 2009-2012. All Rights Reserved.