So currently i'm analysing data from my MYSQL subtitles db, and putting them in ElasticSearch 5.2. Regardless, my ES logstash has the following filter:
filter {
grok {
match => ["subtitles", "%{TIME:[_subtitles][start]} --> %{TIME:[_subtitles][end]}%{GREEDYDATA:[_subtitles][sentence]}" ]
}
}
which is producing the following :
"_subtitles": {
"sentence": [
"im drinking latte",
"im drinking coffee",
"while eating a missisipi cake"
],
"start": [
"00:00:00.934",
"00:00:01.934",
"00:00:04.902"
],
"end": [
"00:00:02.902",
"00:00:03.902",
"00:00:05.839"
]
}
But what i want is this :
"_subtitles": [
{
"sentence": "im drinking latte",
"start": "00:00:00.934",
"end": "00:00:02.902"
},
{... same structure as above},
{... same structure as above},
]
Having in mind that _subtitles will be nested by predefined mapping if needed.
And the original data is as follow:
00:00:00.934 --> 00:00:02.902
im drinking latte
00:00:01.934 --> 00:00:03.902
im drinking coffee
00:00:04.902 --> 00:00:05.839
while eating a missisipi cake