Hello,
I'm trying to add a layer to my template definition to wrap the existing document as an inner field, lets call it 'summary'. I have to do this for several types, each with many fields. One of the bigger issues will be transforming all of the existing data to the new format. I am trying to use Logstash but am looking for a way to grab the whole _source instead of having to write each field by name.
Can someone suggest how to do this properly?
For example:
{
"firstName":"John",
"lastName":"Smith",
"middleName":"Adam"
}
filter {
mutate {
copy => {"firstName" => "summary.firstName"}
copy => {"lastName" => "summary.lastName"}
copy => {"middleName" => "summary.middleName"}
}
}
{
"summary": {
"firstName":"John",
"lastName":"Smith",
"middleName":"Adam"
}
}