indices.putMapping

edit

indices.putMapping

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

Register specific mapping definition for a specific type.

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

Params

includeTypeName

Boolean — Whether a type should be expected in the body of the mappings.

timeout

DurationString — Explicit operation timeout

masterTimeout

DurationString — Specify timeout for connection to master

ignoreUnavailable

Boolean — Whether specified concrete indices should be ignored when unavailable (missing or closed)

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)

[expandWildcards=open]

String — Whether to expand wildcard expression to concrete indices that are open, closed or both.

Options
  • "open"
  • "closed"
  • "none"
  • "all"

updateAllTypes

Boolean — Whether to update the mapping for all fields with the same name across all types or not

index

String, String[], Boolean — 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

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