Join datatypes
If you recall in the Field datatype section of Chapter 4, Mapping APIs, Elasticsearch supports a special datatype called join to create a simple or multiple-level parent/child relationship in documents of the same index. You can define a set of possible relationships in the document with a parent field and a child field. We can establish a one-to-one relationship with the announcement, which is an array of dividend records, or a one-to-many relationship with each individual dividend record. According to the recommendations, you should only use the join datatype when your data contains a one-to-many relationship and the number of entities in many side significantly exceeds the other. Since there is a kind of ETF called a dividend-paying ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access