indices.putMapping

edit
client.indices.putMapping({
  index: string | string[],
  type: string,
  timeout: string,
  master_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'none' | 'all',
  update_all_types: boolean,
  body: object
})

Reference

index

string | string[] - A comma-separated list of index names the mapping should be added to (supports wildcards); use _all or omit to add the mapping on all indices.

type

string - The name of the document type

timeout

string - Explicit operation timeout

master_timeout or masterTimeout

string - Specify timeout for connection to master

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

update_all_types or updateAllTypes

boolean - Whether to update the mapping for all fields with the same name across all types or not

body

object - The mapping definition