elasticsearch/docs/reference/mapping
Luca Cavanna bd3467a305
Add the ability to remove a runtime field (#68992)
Currently, existing runtime fields can be updated, but they cannot be removed. That allows to correct potential mistakes, but once a runtime field is added to the index mappings, it is not possible to remove it.

With this commit we introduce the ability to remove an existing runtime field by providing a null value for it through the put mapping API. If a field with such name does not exist, such specific instruction will have no effect on other existing runtime fields.

Note that the removal of runtime fields makes the recently introduced assertRefreshItNotNeeded assertion trip, because when each local node merges mappings back in, the runtime fields that were previously removed by the master node, get added back again locally. This is only a problem for the assertion that verifies that the removed refresh operation is never needed. We worked around this by tweaking the assertion to ignore runtime fields completely, for simplicity, by assertion on the serialized merged mappings and incoming mappings without the corresponding runtime section.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-16 21:00:16 +01:00
..
dynamic [DOCS] Updates to the runtime fields docs for 7.11+ (#67484) 2021-01-19 10:31:17 -05:00
fields [DOCS] Fix _doc_count field title (#65704) 2020-12-02 08:13:43 -05:00
params [DOCS] Add doc values restriction for wildcard fields (#67503) (#67512) 2021-01-14 09:39:31 -05:00
types [DOCS] Document what makes a geo-point malformed (#59045) (#68556) 2021-02-04 17:01:59 -05:00
dynamic-mapping.asciidoc [DOCS] Clean up index template xrefs (#67264) 2021-01-11 12:38:09 -05:00
explicit-mapping.asciidoc [DOCS] Runtime fields improvements (#66530) 2021-01-11 12:31:26 -05:00
fields.asciidoc Fix typo in fields doc (#64600) 2020-11-04 19:51:14 +02:00
mapping-settings-limit.asciidoc [DOCS] Add docs for runtime fields (#62653) 2020-12-09 17:54:58 -05:00
params.asciidoc Clarify field data cache behavior in docs (#64375) 2020-11-20 13:53:23 -08:00
removal_of_types.asciidoc [DOCS] Runtime fields improvements (#66530) 2021-01-11 12:31:26 -05:00
runtime.asciidoc Add the ability to remove a runtime field (#68992) 2021-02-16 21:00:16 +01:00
types.asciidoc [DOCS] Added docs for aggregate_metric_double field (#66306) 2020-12-15 19:27:10 +02:00