DevOps Classroom Series – 27/Nov/2020

Core Concepts of Elastic Search

  • Indexes:

    • Index is a container that stores and manages documents of single type in Elastic Search
    • Concept of index in Elastic Search is roughly analogous to database schema in relational database. A type is equivalent to table and document is equivalent to record in the table Preview
  • Type:

    • Each documented stored in the elastic search index will have certain type
    • Lets store a students document Preview Preview
  • Document: A document consists of multiple fields and is basic unit of information thats stored in Elasticsearch

    • All documents will have fields, in addition to fields sent by user, Elastic search maintains some internal metafields
      • _id: Unique id of the document
      • _type: type of the document
      • _index: index of the document
  • Nodes:

    • Each machine in Elastic Search Cluster is called as node.
    • A node will have a name
    • A node is responsible for managing its share of data.
  • Cluster: A cluster is responsible for providing operations such as indexing and aggregations. Cluster is formed by one or more nodes.

    • Cluster can host one or more indexes
  • Shards and replicas:

    • A shard helps in distributing an index over cluster. Shards help in dividing the dcouments of single index over multiple nodes. This process of dividing data among shards is called as sharding
    • For each shard one or more replicas can be created Preview
    • Even in the Case of Node failures, data is still available due to process of shrading & replication Preview
  • Mappings and data types:

    • Core data types
      • String data types:
        • text
        • keyword
      • Numeric data types:
        • byte, short, integer, long
        • float and double
      • Date datatype: date
      • Boolean datatype: boolean
      • Binary datatype: binary
    • Complex Datatypes:
      • Array datatype
      • Object datatype
      • Nested datatype
    • Other data types:
      • Geo-point
      • Geo-shape
      • IP datatype Preview
  • Inverted Indexes:

    • This is core data structure of Elastic search which helps in full text search Preview
    • So elastic search builds inverted index for every document stored in the cluster Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin