From 281507fcd8bda8abd3cbecd108112366fd2737b0 Mon Sep 17 00:00:00 2001 From: Chris Cho Date: Tue, 6 Nov 2018 10:19:01 +0900 Subject: [PATCH 1/2] `Convert Processor` enhancement (description, snippet) Sometimes, the users are confused about they can use `Convert Processor` for changing existing field's type to other types even the existing one is already ingested. This confusion is from the first line of description. Also, code snippet has not complete syntax, so it is misleading the right usage. --- docs/reference/ingest/ingest-node.asciidoc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 070892d6f02e7..21f069af64b65 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -828,7 +828,7 @@ include::ingest-node-common-processor.asciidoc[] [[convert-processor]] === Convert Processor -Converts an existing field's value to a different type, such as converting a string to an integer. +Converts a source field's value which is not ingested yet to a different type, such as converting a string to an integer. If the field value is an array, all members will be converted. The supported types include: `integer`, `long`, `float`, `double`, `string`, `boolean`, and `auto`. @@ -857,11 +857,17 @@ include::ingest-node-common-processor.asciidoc[] [source,js] -------------------------------------------------- +PUT _ingest/pipeline/studentindex { - "convert": { - "field" : "url.port", - "type": "integer" - } + "description": "for student index converting from string id field to integer one ", + "processors" : [ + { + "convert" : { + "field" : "id", + "type": "integer" + } + } + ] } -------------------------------------------------- // NOTCONSOLE From e949e9099b9f4a7bdb68fd8dcba2461e20be0477 Mon Sep 17 00:00:00 2001 From: Chris Cho Date: Wed, 7 Nov 2018 22:37:38 +0900 Subject: [PATCH 2/2] change contents more clearly in general way --- docs/reference/ingest/ingest-node.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 21f069af64b65..1a09627741a64 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -828,7 +828,7 @@ include::ingest-node-common-processor.asciidoc[] [[convert-processor]] === Convert Processor -Converts a source field's value which is not ingested yet to a different type, such as converting a string to an integer. +Converts a field in the currently ingested document to a different type, such as converting a string to an integer. If the field value is an array, all members will be converted. The supported types include: `integer`, `long`, `float`, `double`, `string`, `boolean`, and `auto`. @@ -857,9 +857,9 @@ include::ingest-node-common-processor.asciidoc[] [source,js] -------------------------------------------------- -PUT _ingest/pipeline/studentindex +PUT _ingest/pipeline/my-pipeline-id { - "description": "for student index converting from string id field to integer one ", + "description": "converts the content of the id field to an integer", "processors" : [ { "convert" : {