4 Mapping
This chapter covers
- Field data types
- Implicit and explicit mapping
- Core data types
- Advanced data types
- APIs to create/access mappings
Data is like a rainbow—it comes in all sorts of “colors.” Business data has various shapes and forms represented as textual information, dates, numbers, inner objects, Booleans, geolocations, IP addresses, and so on. In Elasticsearch, we model and index data as JSON documents, with each document consisting of a number of fields and every field containing a certain type of data. For example, a movie document may consist of a title and synopsis represented as textual data, a release date as a date, and gross earnings as floating-point data.
In earlier chapters, when we indexed sample documents, we did ...
Get Elasticsearch in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.