Hi Team,
I have a set of documents in an index (index_a) with fields that look like this:
{
_id: <>,
another_id: <>,
float_field: <>,
array: [
{array_1_field_1: <>, array_1_field_2: <>},
{array_2_field_1: <>, array_2_field_2: <>}
]
}
I want to transform the documents in this index into a new index (index_b) such that the elements in the array end up being separate documents:
{
_id: <new>,
another_id: <>,
float_field: <>,
field_1: <array_1_field_1>,
field_2: <array_1_field_2>
}
And another document:
{
_id: <new>,
another_id: <>,
float_field: <>,
field_1: <array_2_field_1>,
field_2: <array_2_field_2>
}
I would like this index_b to be updated in real-time when documents in index_a are added/updated/deleted. Would it be possible to do something like this?