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 ( ...

Get Advanced Elasticsearch 7.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.