Before you formally learn ElasticSearch, first look at the basic concepts in ElasticSearch.
These concepts will appear several times in a later chapter, so it is worthwhile to take 15 minutes to understand them.
English good classmate, please direct to the official website: (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_basic_concepts.html)
Near Realtime (NRT):
ElasticSearch is a "near real-time (NRT)" Search platform, why say "near real-time", because ElasticSearch can be in a "document" to establish "index", Search support in a very short period of time (typically within 1 seconds).
Cluster
A cluster (cluster) is a combination of one or more nodes that manages all of your data and provides a combination of indexing and search services.
Each "cluster" has a unique identity, which defaults to "Elasticsearch". This is a very important identity because a node can belong to only one cluster (cluster).
Node:
Node is a separate search server in the cluster. Responsible for storing the data, participating in the "cluster" to establish indexing and search tasks.
Like "cluster", each node has a unique identifier, which by default is a random name (in English).
By configuring the Cluster.name entry in the/config/elasticsearch.yml file, we can set which "node" belongs to "cluster (cluster)".
Index
Index is a collection of document documents. A "document" in an index should have similar characteristics.
For example, you could create an index for user information, create another index for a product category, or, of course, create an index for order information ......
An index should have a unique "first name" (All lowercase letters), which can be used to index, search, update, and delete documents in the index.
In a node, you can define any number of index (indexes).
Type
Type is a logical category/part that is completely defined by you in the index.
Each index can contain one or more types (type). For example, you are going to build a blogging system and use an "index" to store all the data, in this "index" you can define a "type" for "User Information", another "type" for "blog data", and a third "type" for "comment data" ...
Document
Document is a basic unit of information that can be indexed. Typically in JSON format.
It is important to note that each document must be assigned the corresponding index and type.
Shards & Replicas:
"Shard (Shards)": an "index" may be storing more than the capacity of the hard disk, in order to solve this problem, ElasticSearch support to subdivide an "index" into multiple "shards (shards)", distribute it to different "nodes", constitute a distributed search.
Replica (Replicas): Replica (replicas) provides high availability, which can be recovered from replicas when a node/shard is damaged. Replicas provide scalability, and "replicas" can implement parallel queries when search volumes rise.
Each index can be split into multiple shards, and again, each index can have 0 or more copies.
The number of shards and replicas can be specified at each index creation. However, after the creation is complete, you can no longer allocate the "shard" of the index. By default (with a minimum of two nodes), ElasticSearch allocates 5 shards, and each shard produces 1 copies.
"The search engine ElasticSearch" The main directory "
Search Engine ElasticSearch 2 "basic Concept"