Mappings and data types
Elasticsearch is schema-less, meaning you can store documents with any number of fields and types of fields. In a real-world scenario, data is never completely schema-less or unstructured. There are always some sets of fields that are common across all documents in a type. In fact, types within the indexes should be created based on common fields. Typically, one type of document in an index shares some common fields.
Relational databases impose a strict structure. In a relational database, you need to define the structure of the table with column names and data types for each column at the time of creating the table. You cannot insert a record with a new column or a different data-typed column at runtime.
It is important ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access