mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
* added override flag for rename processer along with factory tests * added yaml tests for rename processor using the override flag * updated renameProcessor tests to include override flag as a parameter * updated rename processor tests to incorporate override flag = true scenario * updated rename processor asciidoc with override option * updated rename processor asciidoc with override option * removed unnecessary supresswarnings tag * corrected formatting errors * updated processor tests * fixed yaml tests * Prefer early throw style here * Whitespace * Move and rewrite this test It's just a simple test of the primary behavior of the rename processor, so put it first and simplify it. * Rename this test It doesn't actually exercise template snippets * Tidy up this test --------- Co-authored-by: Joe Gallo <joegallo@gmail.com>
30 lines
1.1 KiB
Text
30 lines
1.1 KiB
Text
[[rename-processor]]
|
|
=== Rename processor
|
|
++++
|
|
<titleabbrev>Rename</titleabbrev>
|
|
++++
|
|
|
|
Renames an existing field. If the field doesn't exist or the new name is already used, an exception will be thrown.
|
|
|
|
[[rename-options]]
|
|
.Rename Options
|
|
[options="header"]
|
|
|======
|
|
| Name | Required | Default | Description
|
|
| `field` | yes | - | The field to be renamed. Supports <<template-snippets,template snippets>>.
|
|
| `target_field` | yes | - | The new name of the field. Supports <<template-snippets,template snippets>>.
|
|
| `ignore_missing` | no | `false` | If `true` and `field` does not exist, the processor quietly exits without modifying the document.
|
|
| `override` | no | `false` | If `true`, the processor will update pre-existing non-null-valued fields. When set to `false`, such fields will not be touched.
|
|
include::common-options.asciidoc[]
|
|
|======
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{
|
|
"rename": {
|
|
"field": "provider",
|
|
"target_field": "cloud.provider"
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// NOTCONSOLE
|