Chapter 8. Relations among documents

This chapter covers

  • Objects and arrays of objects
  • Nested mapping, queries, and filters
  • Parent mapping, has_parent, and has_child queries and filters
  • Denormalization techniques

Some data is inherently relational. For example, with the get-together site we’ve used throughout the book, there are groups of people with the same interests and events organized by those groups. How might you search for groups that host events about a certain topic?

If your data is flat structured, then you might as well skip this chapter and move on to scaling out, which will be discussed in chapter 9. This is typically the case for logs, where you have independent fields, such as timestamp, severity, and message. If, on the other ...

Get Elasticsearch in Action now with O’Reilly online learning.

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