array object as a separate hidden… will return the above document whereas ideally, it should have returned 0 results. This is because after transforming the document into the above form the correlation between different elements of the array is lost.
So Nested type comes to our rescue! It indexes each array object as a separate hidden document, so…