Dynamic mapping in Elasticsearch

To create a table inside a relational database, you must specify a model, which stores information about the name and data type of each column. This information must be supplied before any data is inserted.

Elasticsearch has a similar concept called type mapping, which stores information about the name and data type of each property in the document. The difference is that we don't have to supply the type mapping before we insert any data; in fact, we don't have to supply it at all! This is because when Elasticsearch tries to infer the data type from the documents being indexed, it will add it to the type mapping. This automatic detection of data types and addition to type mapping is what we refer to as dynamic ...

Get Building Enterprise JavaScript Applications 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.