indices.putTemplate

edit

indices.putTemplate

edit
client.indices.putTemplate([params, [callback]])

Create an index template that will automatically be applied to new indices created.

Check the API Conventions and the elasticsearch docs for more information pertaining to this method.

Params

order

Number — The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)

create

Boolean — Whether the index template should only be added if new or can also replace an existing one

timeout

DurationString — Explicit operation timeout

masterTimeout

DurationString — Specify timeout for connection to master

flatSettings

Boolean — Return settings in flat format (default: false)

name

String — The name of the template

body

Object, JSON — The request body, as either JSON or a JSON serializable object. See the elasticsearch docs for details about what can be specified here.

back to top