Chapter 2. Diving into the functionality

 

This chapter covers

  • Defining documents, types, and indices
  • Understanding Elasticsearch nodes and primary and replica shards
  • Indexing documents with cURL and a data set
  • Searching and retrieving data
  • Setting Elasticsearch configuration options
  • Working with multiple nodes

Now you know what kind of search engine Elasticsearch is, and you’ve seen some of its main features in chapter 1. Let’s switch to the practical side and see how it does what it’s good at. Imagine you’re tasked with creating a way to search through millions of documents, like a website that allows people to build common interest groups and get together. In this case, documents could be the get-together groups, individual events. You need to implement this in a fault-tolerant way, and you need your setup to be able to accommodate more data and more concurrent searches, as your get-together site becomes more successful.

In this chapter, we’ll show you how to deal with such a scenario by explaining how Elasticsearch data is organized. Then you’ll get practical and start indexing and searching some real data for a get-together website using the code samples provided for this chapter. We’ll use this get-together example and the code samples throughout the book to allow you to do some “real” searches and indexing.

2.1. Understanding the logical layout: documents, types, and indices

2.2. Understanding the physical layout: nodes and shards

2.3. Indexing new data

2.4. Searching for and retrieving data

2.5. Configuring Elasticsearch

2.6. Adding nodes to the cluster

2.7. Summary

sitemap