Relating two fields


I don't know if I'm righting post the question here or if it would be more correct post it in elasticforum.

So, I got two arrays of strings in the same document. The first array is an array of names, and the second is an array of integer. Is there any way it's possible concatenate them by position, for example? Like the first position of array 1 matches the first position of array 2.

And yes, this is a kinda of workaround of Kibana not supporting nested objects.

If you guys got any solutions, or you think this is impossible please tell.


@Francisco1 This may be possible using Scripted Fields in Kibana. A scripted string field with painless script similar to: doc['field1'][0] + doc['field2'][0] should give a new field with the concatenated values for position 0. You should be able to apply the above logic in a loop to concatenate and store all the array elements in a new scripted string field.

That's one hell of a idea. I'll try it out bro and then I'll give you feedback, thank you :slight_smile:

Hello mate!

I've tryed what you said and it makes sense :slightly_smiling_face:

I've ended up posting each element one by one so I can visualize it on Kibana. If someone would like more info please contact.

Thanks @vinodr

@Francisco1 Awesome! Glad it worked :slight_smile:

1 Like

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