Class PutIndexTemplateRequestBuilder
org.elasticsearch.action.ActionRequestBuilder<Request,Response>
org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder<PutIndexTemplateRequest,AcknowledgedResponse,PutIndexTemplateRequestBuilder>
org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder
public class PutIndexTemplateRequestBuilder
extends MasterNodeOperationRequestBuilder<PutIndexTemplateRequest,AcknowledgedResponse,PutIndexTemplateRequestBuilder>
-
Field Summary
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionPutIndexTemplateRequestBuilder(ElasticsearchClient client, PutIndexTemplateAction action)
PutIndexTemplateRequestBuilder(ElasticsearchClient client, PutIndexTemplateAction action, name)
-
Method Summary
Modifier and TypeMethodDescriptionAdds an alias that will be added when the index template gets created.type, ... source)
A specialized simplified mapping source method, takes the form of simple properties definition: ("field1", "type=string,store=true").type, source, org.elasticsearch.common.xcontent.XContentType xContentType)
Adds mapping that will be added when the index template gets created.type, <,> source)
Adds mapping that will be added when the index gets created.type, org.elasticsearch.common.xcontent.XContentBuilder source)
Adds mapping that will be added when the index template gets created.cause)
The cause for this index template creation.source)
Sets the aliases that will be associated with the index when it gets created<,> source)
Sets the aliases that will be associated with the index when it gets createdsetAliases(BytesReference source)
Sets the aliases that will be associated with the index when it gets createdsetAliases(org.elasticsearch.common.xcontent.XContentBuilder source)
Sets the aliases that will be associated with the index when it gets createdsetCreate(boolean create)
Set totrue
to force only creation, not an update of an index template.setOrder(int order)
Sets the order of this template if more than one template matches.<> indexPatterns)
Sets the match expression that will be used to match on indices created.source, org.elasticsearch.common.xcontent.XContentType xContentType)
The settings to crete the index template with (either json or yaml format)<,> source)
The settings to crete the index template with (either json or yaml format)setSettings(Settings settings)
The settings to created the index template with.setSettings(Settings.Builder settings)
The settings to created the index template with.setSource(byte[] templateSource, int offset, int length, org.elasticsearch.common.xcontent.XContentType xContentType)
The template source definition.setSource(byte[] templateSource, org.elasticsearch.common.xcontent.XContentType xContentType)
The template source definition.<,> templateSource)
The template source definition.setSource(BytesReference templateSource, org.elasticsearch.common.xcontent.XContentType xContentType)
The template source definition.setSource(org.elasticsearch.common.xcontent.XContentBuilder templateBuilder)
The template source definition.version)
Sets the optional version of this template.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder
setMasterNodeTimeout, setMasterNodeTimeout
Methods inherited from class org.elasticsearch.action.ActionRequestBuilder
execute, execute, get, get, get, request
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
PutIndexTemplateRequestBuilder
-
PutIndexTemplateRequestBuilder
public PutIndexTemplateRequestBuilder(ElasticsearchClient client, PutIndexTemplateAction action, name)
-
-
Method Details
-
setPatterns
public <> indexPatterns)Sets the match expression that will be used to match on indices created. -
setOrder
Sets the order of this template if more than one template matches. -
setVersion
public version)Sets the optional version of this template. -
setCreate
Set totrue
to force only creation, not an update of an index template. If it already exists, it will fail with an . -
setSettings
The settings to created the index template with. -
setSettings
The settings to created the index template with. -
setSettings
public source, org.elasticsearch.common.xcontent.XContentType xContentType)The settings to crete the index template with (either json or yaml format) -
setSettings
public <,> source)The settings to crete the index template with (either json or yaml format) -
addMapping
public type, source, org.elasticsearch.common.xcontent.XContentType xContentType)Adds mapping that will be added when the index template gets created.- Parameters:
type
- The mapping typesource
- The mapping sourcexContentType
- The type/format of the source
-
addMapping
public type, ... source)A specialized simplified mapping source method, takes the form of simple properties definition: ("field1", "type=string,store=true"). -
setAliases
public <,> source)Sets the aliases that will be associated with the index when it gets created -
setAliases
public source)Sets the aliases that will be associated with the index when it gets created -
setAliases
public PutIndexTemplateRequestBuilder setAliases(org.elasticsearch.common.xcontent.XContentBuilder source)Sets the aliases that will be associated with the index when it gets created -
setAliases
Sets the aliases that will be associated with the index when it gets created -
addAlias
Adds an alias that will be added when the index template gets created.- Parameters:
alias
- The alias- Returns:
- the request builder
-
cause
public cause)The cause for this index template creation. -
addMapping
public type, org.elasticsearch.common.xcontent.XContentBuilder source)Adds mapping that will be added when the index template gets created.- Parameters:
type
- The mapping typesource
- The mapping source
-
addMapping
public type, <,> source)Adds mapping that will be added when the index gets created.- Parameters:
type
- The mapping typesource
- The mapping source
-
setSource
public PutIndexTemplateRequestBuilder setSource(org.elasticsearch.common.xcontent.XContentBuilder templateBuilder)The template source definition. -
setSource
public <,> templateSource)The template source definition. -
setSource
public PutIndexTemplateRequestBuilder setSource(BytesReference templateSource, org.elasticsearch.common.xcontent.XContentType xContentType)The template source definition. -
setSource
public PutIndexTemplateRequestBuilder setSource(byte[] templateSource, org.elasticsearch.common.xcontent.XContentType xContentType)The template source definition. -
setSource
public PutIndexTemplateRequestBuilder setSource(byte[] templateSource, int offset, int length, org.elasticsearch.common.xcontent.XContentType xContentType)The template source definition.
-