Using an array of objects datatype

As we have discussed in the previous sub-section, additional work is required to manually separate dividend records into a document to perform indexing. Another way is to embed all dividend records from the ETF into a parent document using an array of objects. In this approach, you need not index a lot of documents for a single ETF. However, when a new dividend is announced to an ETF, you need to update the corresponding document. Since the frequency of distributing dividend for ETFs is not that high, it seems that this approach may be the most suitable approach.

Let's practice using an array of objects to expand our system. From the aforementioned GitHub site (https://github.com/PacktPublishing/Mastering-Elasticsearch-7.0/tree/master/Chapter07 ...

Get Advanced Elasticsearch 7.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.