I am starting to learn ElasticSearch (https://www.elastic.co/). I have recently became involved in a project at work which utilizes elastic. So, a good way to learn it is to set up my own instance at home. I also signed up for a couple of classes on Udemy that are helping me get going.
This article will contain my notes as I learn about elastic. So, take it with a grain of salt as I learn and update it.
Clusters and Nodes
A cluster is a collection of nodes.
Nodes are named with a uuid. The default cluster is named elasticsearch.
Elasticsearch exposes an http REST API.
The master node is responsible for updating a cluster's state.
Documents and Indices
Documents are stored within an index. Documents have a unique id. Indices also have names.
Types are being phased out of elastic search.
Sharding is needed to split and balance index across multiple nodes. A shard is a subset of an indexes data. This aids with scaling your data. By default, there are 5 shards added for each index
Shards get replicated across multiple nodes. So there are primary shards and replica shards. Replica shards are never created in the same node. This also increases search capabilities.
Replicas will need to be kept in sync. The primary shard is responsible for validating all operations.
Installing on Linux
- Install java (ver 8 minimum) http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
- Install Elastic https://www.elastic.co/downloads/elasticsearch