Skip to content

Commit

Permalink
Add an example of dot_expander's path option (#94291) (#94331)
Browse files Browse the repository at this point in the history
  • Loading branch information
joegallo authored Mar 6, 2023
1 parent 7d37a78 commit 1c42f32
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/reference/ingest/processors/dot-expand.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,50 @@ into:

'''

If the dotted field is nested within a non-dotted structure, then use the `path` option to navigate the
non-dotted structure:

[source,js]
--------------------------------------------------
{
"dot_expander": {
"path": "foo"
"field": "*"
}
}
--------------------------------------------------
// NOTCONSOLE

The dot expand processor would turn this document:

[source,js]
--------------------------------------------------
{
"foo" : {
"bar.one" : "value",
"bar.two" : "value"
}
}
--------------------------------------------------
// NOTCONSOLE

into:

[source,js]
--------------------------------------------------
{
"foo" : {
"bar" : {
"one" : "value",
"two" : "value"
}
}
}
--------------------------------------------------
// NOTCONSOLE

'''

If any field outside of the leaf field conflicts with a pre-existing field of the same name,
then that field needs to be renamed first.

Expand Down

0 comments on commit 1c42f32

Please sign in to comment.