Browse Source

Add an example of dynamic field names (#27255)

Loek van Gool 8 years ago
parent
commit
67e677f443
1 changed files with 14 additions and 0 deletions
  1. 14 0
      docs/reference/ingest/ingest-node.asciidoc

+ 14 - 0
docs/reference/ingest/ingest-node.asciidoc

@@ -563,6 +563,20 @@ to set the index that the document will be indexed into:
 --------------------------------------------------
 // NOTCONSOLE
 
+Dynamic field names are also supported. This example sets the field named after the 
+value of `service` to the value of the field `code`:
+
+[source,js]
+--------------------------------------------------
+{
+  "set": {
+    "field": "{{service}}"
+    "value": "{{code}}"
+  }
+}
+--------------------------------------------------
+// NOTCONSOLE
+
 [[handling-failure-in-pipelines]]
 == Handling Failures in Pipelines