Skip to content

Commit

Permalink
[Docs] Improve Convert Processor description (#35280)
Browse files Browse the repository at this point in the history
Sometimes users are confused about whether they can use the Convert Processor
for changing an existing fields type to other types even if the existing one is already
ingested. This confusion is from the first line of description. Changing this and also
adding a some detail to the code snippet.
  • Loading branch information
insukcho authored and Christoph Büscher committed Nov 7, 2018
1 parent 723f57a commit 10be8ad
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/reference/ingest/ingest-node.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 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`.
Expand Down Expand Up @@ -857,11 +857,17 @@ include::ingest-node-common-processor.asciidoc[]

[source,js]
--------------------------------------------------
PUT _ingest/pipeline/my-pipeline-id
{
"convert": {
"field" : "url.port",
"type": "integer"
}
"description": "converts the content of the id field to an integer",
"processors" : [
{
"convert" : {
"field" : "id",
"type": "integer"
}
}
]
}
--------------------------------------------------
// NOTCONSOLE
Expand Down

0 comments on commit 10be8ad

Please sign in to comment.