diff --git a/docs/reference/mapping.asciidoc b/docs/reference/mapping.asciidoc index e7d15aa42b7..407f43625fa 100644 --- a/docs/reference/mapping.asciidoc +++ b/docs/reference/mapping.asciidoc @@ -53,6 +53,17 @@ Each field has a data `type` which can be: * or a specialised type like <>, <>, or <>. +It is often useful to index the same field in different ways for different +purposes. For instance, a `string` field could be <> as +an `analyzed` field for full-text search, and as a `not_analyzed` field for +sorting or aggregations. Alternatively, you could index a string field with +the <>, the +<> analyzer, and the +<>. + +This is the purpose of _multi-fields_. Most datatypes support multi-fields +via the <> parameter. + [float] == Dynamic mapping diff --git a/docs/reference/mapping/types.asciidoc b/docs/reference/mapping/types.asciidoc index f7c93b04718..abefda42085 100644 --- a/docs/reference/mapping/types.asciidoc +++ b/docs/reference/mapping/types.asciidoc @@ -40,6 +40,20 @@ Attachment datatype:: which supports indexing ``attachments'' like Microsoft Office formats, Open Document formats, ePub, HTML, etc. into an `attachment` datatype. +[float] +=== Multi-fields + +It is often useful to index the same field in different ways for different +purposes. For instance, a `string` field could be <> as +an `analyzed` field for full-text search, and as a `not_analyzed` field for +sorting or aggregations. Alternatively, you could index a string field with +the <>, the +<> analyzer, and the +<>. + +This is the purpose of _multi-fields_. Most datatypes support multi-fields +via the <> parameter. + include::types/array.asciidoc[] include::types/binary.asciidoc[]