org.elasticsearch.action.admin.indices.template.put
Class PutIndexTemplateRequestBuilder

java.lang.Object
  extended by org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder<PutIndexTemplateRequest,PutIndexTemplateResponse>
      extended by org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder
All Implemented Interfaces:
ActionRequestBuilder<PutIndexTemplateRequest,PutIndexTemplateResponse>

public class PutIndexTemplateRequestBuilder
extends BaseIndicesRequestBuilder<PutIndexTemplateRequest,PutIndexTemplateResponse>


Field Summary
 
Fields inherited from class org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder
client, request
 
Constructor Summary
PutIndexTemplateRequestBuilder(IndicesAdminClient indicesClient)
           
PutIndexTemplateRequestBuilder(IndicesAdminClient indicesClient, String name)
           
 
Method Summary
 PutIndexTemplateRequestBuilder addMapping(String type, Map<String,Object> source)
          Adds mapping that will be added when the index gets created.
 PutIndexTemplateRequestBuilder addMapping(String type, String source)
          Adds mapping that will be added when the index template gets created.
 PutIndexTemplateRequestBuilder addMapping(String type, XContentBuilder source)
          Adds mapping that will be added when the index template gets created.
 PutIndexTemplateRequestBuilder cause(String cause)
          The cause for this index template creation.
protected  void doExecute(ActionListener<PutIndexTemplateResponse> listener)
           
 PutIndexTemplateRequestBuilder setCreate(boolean create)
          Set to true to force only creation, not an update of an index template.
 PutIndexTemplateRequestBuilder setMasterNodeTimeout(String timeout)
          Sets the master node timeout in case the master has not yet been discovered.
 PutIndexTemplateRequestBuilder setMasterNodeTimeout(TimeValue timeout)
          Sets the master node timeout in case the master has not yet been discovered.
 PutIndexTemplateRequestBuilder setOrder(int order)
          Sets the order of this template if more than one template matches.
 PutIndexTemplateRequestBuilder setSettings(Map<String,Object> source)
          The settings to crete the index template with (either json/yaml/properties format)
 PutIndexTemplateRequestBuilder setSettings(Settings.Builder settings)
          The settings to created the index template with.
 PutIndexTemplateRequestBuilder setSettings(Settings settings)
          The settings to created the index template with.
 PutIndexTemplateRequestBuilder setSettings(String source)
          The settings to crete the index template with (either json/yaml/properties format)
 PutIndexTemplateRequestBuilder setSource(byte[] templateSource)
          The template source definition.
 PutIndexTemplateRequestBuilder setSource(byte[] templateSource, int offset, int length)
          The template source definition.
 PutIndexTemplateRequestBuilder setSource(BytesReference templateSource)
          The template source definition.
 PutIndexTemplateRequestBuilder setSource(Map templateSource)
          The template source definition.
 PutIndexTemplateRequestBuilder setSource(String templateSource)
          The template source definition.
 PutIndexTemplateRequestBuilder setSource(XContentBuilder templateBuilder)
          The template source definition.
 PutIndexTemplateRequestBuilder setTemplate(String template)
          Sets the template match expression that will be used to match on indices created.
 PutIndexTemplateRequestBuilder setTimeout(String timeout)
          Timeout to wait for the index creation to be acknowledged by current cluster nodes.
 PutIndexTemplateRequestBuilder 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

PutIndexTemplateRequestBuilder

public PutIndexTemplateRequestBuilder(IndicesAdminClient indicesClient)

PutIndexTemplateRequestBuilder

public PutIndexTemplateRequestBuilder(IndicesAdminClient indicesClient,
                                      String name)
Method Detail

setTemplate

public PutIndexTemplateRequestBuilder setTemplate(String template)
Sets the template match expression that will be used to match on indices created.


setOrder

public PutIndexTemplateRequestBuilder setOrder(int order)
Sets the order of this template if more than one template matches.


setCreate

public PutIndexTemplateRequestBuilder setCreate(boolean create)
Set to true to force only creation, not an update of an index template. If it already exists, it will fail with an IndexTemplateAlreadyExistsException.


setSettings

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


setSettings

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


setSettings

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


setSettings

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


addMapping

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

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

cause

public PutIndexTemplateRequestBuilder cause(String cause)
The cause for this index template creation.


addMapping

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

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

addMapping

public PutIndexTemplateRequestBuilder 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 PutIndexTemplateRequestBuilder setSource(XContentBuilder templateBuilder)
The template source definition.


setSource

public PutIndexTemplateRequestBuilder setSource(Map templateSource)
The template source definition.


setSource

public PutIndexTemplateRequestBuilder setSource(String templateSource)
The template source definition.


setSource

public PutIndexTemplateRequestBuilder setSource(BytesReference templateSource)
The template source definition.


setSource

public PutIndexTemplateRequestBuilder setSource(byte[] templateSource)
The template source definition.


setSource

public PutIndexTemplateRequestBuilder setSource(byte[] templateSource,
                                                int offset,
                                                int length)
The template source definition.


setTimeout

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


setTimeout

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


setMasterNodeTimeout

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


setMasterNodeTimeout

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


doExecute

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


Copyright © 2009-2012. All Rights Reserved.