In the previous chapter, we learned how to set up and configure Elasticsearch. Once the cluster is up and running, you can start indexing your data. Elasticsearch will automatically figure out the schema of the documents when you index, which works great for getting started. But for all practical purposes, you have to tell Elasticsearch the schema of your data to avoid any surprises. Modeling your data is one of the most important steps before using Elasticsearch. In this chapter, you’ll learn how to model your data and handle relations between different document types. In this chapter, we will cover the following:
- Configure mappings
- Dynamic mapping
- Core data types
- Complex data types
- Geo location
- Modeling relations in Elasticsearch