Separate fields from one document to create one document per field


Sorry if the title isn't really speaking but I don't know how to explain my problem in other way than giving a concrete example.
So here is what I want to do :

I have an index where the document contains data like this :

{ "value_A_1": 10, "value_A_2": 20, "value_A_3": 30, "value_B_1": 10, "value_B_2": 20, "value_B_3": 30, "value_C_1": 10, "value_C_2": 20, "value_C_3": 30 }

But I want to have an index where a document is made of 3 value like this :

{ "Letter": A, "Number": 1, "Value": 10 } { "Letter": A, "Number": 2, "Value": 20 } [ ... ] { "Letter": C, "Number": 3, "Value": 30 }

In this example, the input would be 1 document (one json) (with 9 différent fields) but the output on the index would be 9 different documents each containingsame fields (that describe the input field).

I don't know if I'm clear, I've made some research but didn't found what I want.
I've lookup into reindexing, scripting ... but in vain
I think I can manage to do that in a script but my goal is to do that directly into kibana either by reindexing or with a script, or both ...

Thank you

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