3 Architecture

 

This chapter covers

  • High-level architecture and Elasticsearch’s building blocks
  • Search and indexing mechanics
  • Understanding how an inverted index works
  • Relevancy and similarity algorithms
  • Routing algorithms

In chapter 2, we played with fundamental Elasticsearch features: we indexed documents, executed search queries, walked through analytical functions, and more. We briefly played with the server, without knowing much about its internals. The good news is that we don’t need to break a sweat to get started with Elasticsearch. It is easy to use at a simple level but takes time to master.

Of course, Elasticsearch, like any other search engine, requires deep dives to become a master of the technology. That said, the product is designed to work out of the box with intuitive APIs and tools, and we can use the software without much prerequisite knowledge. Before we get carried away with the easy-to-use, hands-on aspects of Elasticsearch, it will benefit us in the long run to understand the high-level architecture, the inner workings of the server, and the dichotomy of its moving parts.

3.1 A high-level overview

3.1.1 Data in

3.1.2 Processing data

3.1.3 Data out

3.2 The building blocks

3.2.1 Documents

3.2.2 Indexes

3.2.3 Data streams

3.2.4 Shards and replicas

3.2.5 Nodes and clusters

3.3 Inverted indexes