Chapter 4. Data Modeling and Analytics
In the previous chapter, we discussed searching across different fields with the help of different variants of multimatch queries, then we went through one of the most powerful features of Elasticsearch:Â function score queries, which give more power to the user for controlling document relevancy by using custom scores. Finally, we covered the scripting module of Elasticsearch in detail. In this chapter, we will see how we can deal with the general problems of structuring data in Elasticsearch and the different data modeling techniques. We will also discuss the aggregation module of Elasticsearch for data analytics purposes. By the end of this chapter, we will have covered the following topics:
- Data modeling techniques in Elasticsearch
- Managing relational data in Elasticsearch using parent-child and nested types
- Data analytics using aggregations
- The new aggregation category: Matrix aggregation