I'm trying to index a document like this into Elasticsearch:
{
"foo.bar": 17,
"foo.baz": 23
}
I would like to expand the foo field into an object, so the document that gets indexed looks like this:
{
"foo": {
"bar": 17,
"baz": 23
}
}
I can use the dot_expander Ingest processor to perform the expansion by defining a pipeline like so:
{
"pipeline": {
"description": "Ze un-flattener!!!",
"processors": [
{
"dot_expander": {
"field": "foo.bar"
}
},
{
"dot_expander": {
"field": "foo.baz"
}
}
]
}
}
However, if I were to later add another sub-field under foo in my source document, I would have to update the Ingest pipeline with another dot_expander processor to handle that sub-field as well.
It would nice if the dot_expander processor supported an option to expand a given field recursively, something like this:
{
"dot_expander": {
"field": "foo",
"recursive": true
}
}
Thanks!
I'm trying to index a document like this into Elasticsearch:
{ "foo.bar": 17, "foo.baz": 23 }I would like to expand the
foofield into an object, so the document that gets indexed looks like this:{ "foo": { "bar": 17, "baz": 23 } }I can use the
dot_expanderIngest processor to perform the expansion by defining a pipeline like so:{ "pipeline": { "description": "Ze un-flattener!!!", "processors": [ { "dot_expander": { "field": "foo.bar" } }, { "dot_expander": { "field": "foo.baz" } } ] } }However, if I were to later add another sub-field under
fooin my source document, I would have to update the Ingest pipeline with anotherdot_expanderprocessor to handle that sub-field as well.It would nice if the
dot_expanderprocessor supported an option to expand a given field recursively, something like this:{ "dot_expander": { "field": "foo", "recursive": true } }Thanks!