🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Understanding Elasticsearch Index Mapping & Schema

A schema is a description of one or more fields that describes the document type and how to handle the different fields of a document.

The schema in Elasticsearch is a mapping that describes the the fields in the JSON documents along with their data type, as well as how they should be indexed in the Lucene indexes that lie under the hood. Because of this, in Elasticsearch terms, we usually call this schema a “mapping”.

  • Conceptually, an Elasticsearch server contains zero or more indexes.
  • An index is a container for zero or more types, which in turn has zero or more documents. To put it another way: a document has an identifier, belongs to a type, which belongs to an index.
  • Elasticsearch is multi-tenant, by which we mean that a single server can store multiple indexes and multiple types.
  • Elasticsearch has the ability to be schema-less, which means that documents can be indexed without explicitly providing a schema.
  • If you do not specify a mapping, Elasticsearch will by default generate one dynamically when detecting new fields in documents during indexing.
  • However, this dynamic mapping generation comes with a few caveats:Detected types might not be correct, May lead to unnecessary duplication


Mapping Type
Each index has one mapping type which determines how the document will be indexed. A mapping type has:

  1. Meta-fields  – Meta-fields are used to customize how a document’s metadata associated is treated. Examples of meta-fields include the document’s _index, _type, _id, and _source fields.
  2. Fields or properties – A mapping type contains a list of fields or properties pertinent to the document.

Fields datatypes
Each field has a data type which can be:

  • a simple type like text, keyword, date, long, double, boolean or ip.
  • a type which supports the hierarchical nature of JSON such as object or nested.
  • or a specialised type like geo_point, geo_shape, or completion.

Reference

  • https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#_field_datatypes
  • https://www.wikitechy.com/tutorials/elasticsearch/elasticsearch-mapping
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x