How to split nested json list into different document

Hello!
I would to split a nested json array into different unique json document.
For example, I have this document


{
                            "beginTimeSeconds": 1655886958,
                            "endTimeSeconds": 1655887018,
                            "area": "Factory",
                            "product": [
                                "aaaaa7e5a709a7e5",
                                "bbbbb7c2a1f635c2",
                                "ccccc422f9e47618"
]
}

and I would have this :


 {
                            "beginTimeSeconds": 1655886958,
                            "endTimeSeconds": 1655887018,
                            "area": "Factory",
                            "product": "aaaaa7e5a709a7e5"

},

 {
                            "beginTimeSeconds": 1655886958,
                            "endTimeSeconds": 1655887018,
                            "area": "Factory",
                            "product": "bbbbb7c2a1f635c2"

},
 {
                            "beginTimeSeconds": 1655886958,
                            "endTimeSeconds": 1655887018,
                            "area": "Factory",
                            "product": "ccccc422f9e47618"
}

Can someone help me?

You can do that in Logstash using a split filter. Splitting documents is as far as I know not possible through ingest pipelines.

Thank you so much!
Do you mean that it is impossible to create an index in the second shape if i have the index in the first form in Elastic, it is correct?

Purely within Elasticsearch I do not think that is possible.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.