indices.putTemplate

edit
client.indices.putTemplate({
  name: string,
  include_type_name: boolean,
  order: number,
  create: boolean,
  timeout: string,
  master_timeout: string,
  flat_settings: boolean,
  body: object
})

Reference

name

string - The name of the template

include_type_name or includeTypeName

boolean - Whether a type should be returned in the body of the mappings.

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

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

body

object - The template definition