Skip to content

Commit

Permalink
[DOCS] Clarify multi-field addition requires update by query for exis…
Browse files Browse the repository at this point in the history
…ting documents (#91541) (#91692)

* [DOCS] Clarify multi-field addition requires update by query for existing documents

* Update docs/reference/mapping/params/multi-fields.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

* Update docs/reference/indices/put-mapping.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

Co-authored-by: Anthony McGlone <102866938+anthonymcglone2022@users.noreply.github.com>
  • Loading branch information
abdonpijpelink and anthonymcglone2022 authored Nov 18, 2022
1 parent 5412ff4 commit b06be47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/indices/put-mapping.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ PUT /my-index-000001/_mapping
You can use the update mapping API to update the `fields` mapping parameter and
enable multi-fields for an existing field.

WARNING: If an index (or data stream) contains documents when you add a
multi-field, those documents will not have values for the new multi-field. You
can populate the new multi-field with the <<picking-up-a-new-property,update by
query API>>.

To see how this works, try the following example.

Use the <<indices-create-index,create index>> API to create an index with the
Expand Down
5 changes: 5 additions & 0 deletions docs/reference/mapping/params/multi-fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ GET my-index-000001/_search
You can add multi-fields to an existing field using the
<<indices-put-mapping,update mapping API>>.

WARNING: If an index (or data stream) contains documents when you add a
multi-field, those documents will not have values for the new multi-field. You
can populate the new multi-field with the <<picking-up-a-new-property,update by
query API>>.

A multi-field mapping is completely separate from the parent field's mapping. A
multi-field doesn't inherit any mapping options from its parent field.
Multi-fields don't change the original `_source` field.
Expand Down

0 comments on commit b06be47

Please sign in to comment.