$30 off During Our Annual Pro Sale. View Details »

Understanding ElasticSearch

Devi
April 06, 2022

Understanding ElasticSearch

- Introduction
- Mental model - Documents, Indices and shards
- Under the hood
- Mapping design

Devi

April 06, 2022
Tweet

More Decks by Devi

Other Decks in Technology

Transcript

  1. Agenda • Introduction • Mental model - Documents, Indices and

    shards • Under the hood • Mapping design • Q & A
  2. Use cases • Search Ranking • Text analysis and full

    text search • Aggregations • Highlighting, auto-correction, different languages, synonyms and many more.
  3. Start cluster • Configuration in elasticsearch.yml • Node discovery •

    Node roles and networking GET /_cat/nodes GET /_cat/shards GET /_cat/indices
  4. Adding a doc • Finds a primary shard to routes

    the doc ◦ builds inverted indexes and other data structures • Replicates to replicas API: POST /<target>/_create/<_id>
  5. Mapping (Contd…) Interesting Attributes • index (should this be searchable?)

    • norms (should this be used for scoring?) • analyzer (should ES “analyze” this text?) • doc_values (should this be used for sorting/aggregations?) API: GET /<index>/_mapping
  6. References - https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html - ElasticSearch terminology https://www.elastic.co/guide/en/elastic-stack-glossary/current/terms.html - Shard Allocation

    https://www.elastic.co/blog/every-shard-deserves-a-home - Defintive book https://allen8807.gitbooks.io/elasticsearch-definitive-guide-en/content/index.ht ml