2.X/1. Getting Started 93

1-02-2. Cluster Health

Many statistics can be monitored in an Elasticsearch cluster, but the single most important one is cluster health, which reports a status of either green, yellow, or red:Elasticsearch cluster를 모니터링할 수 있는 많은 통계가 있지만, 가장 중요한 하나는 cluster health 이다. 이것은 green, yellow, red 중의 하나로 표시되어 status 로 보고된다.GET /_cluster/healthCOPY AS CURLVIEW IN SENSE On an empty cluster with no indices, this will return som..

1-02-3. Add an Index

To add data to Elasticsearch, we need an index—a place to store related data. In reality, an index is just a logical namespace that points to one or more physical shards.Elasticsearch에 데이터를 추가하기 위해서는, 관련된 데이터를 저장할 수 있는 장소인 index 가 필요하다.실제로, index는 하나 이상의 물리적인 shards 를 가리키는 logical namespace 이다.A shard is a low-level worker unit that holds just a slice of all the data in the index. In Inside a Sh..

1-02-4. Add Failover

Running a single node means that you have a single point of failure—there is no redundancy.Fortunately, all we need to do to protect ourselves from data loss is to start another node.단일 node를 실행한다는 것은 단일 장애 지점을 가지고 있다(복사본이 없다)는 것을 의미한다. 다행히, 데이터 손실을 피하기 위해, 해야 할 것은, 다른 node를 시작하는 것뿐이다.두 번째 node를 시작하려면To test what happens when you add a second node, you can start a new node in exactly the same wa..

1-02-5. Scale Horizontally

What about scaling as the demand for our application grows? If we start a third node, our cluster reorganizes itself to look like Figure 4, “세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다)”.응용프로그램에 대한 수요가 증가함에 따라, 확장하면 어떠할까? 세 번째 node를 시작하면, cluster는 Figure 4, “세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다)”처럼 스스로를 인식할 것이다.Figure 4. 세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다) One shar..

1-02-6. Coping with Failure

We’ve said that Elasticsearch can cope when nodes fail, so let’s go ahead and try it out. If we kill the first node, our cluster looks like Figure 6, “node 하나를 kill한 후의 cluster”.node에 장애가 발생할 경우, Elasticsearch는 대응할 수 있다고 했는데, 한 번 test해 보자. cluster의 첫 번째 node를 kill하면, Figure 6, “node 하나를 kill한 후의 cluster”처럼 보일 것이다.Figure 6. node 하나를 kill한 후의 cluster The node we killed was the master node. A clust..

1-03-01. What Is a Document?

Most entities or objects in most applications can be serialized into a JSON object, with keys and values. A key is the name of a field or property, and a value can be a string, a number, a Boolean, another object, an array of values, or some other specialized type such as a string representing a date or an object representing a geolocation:대부분의 응용프로그램에서 대부분의 요소나 오브젝트는 key/value를 가진 JSON 오브젝트로 나타..

1-03-02. Document Metadata

A document doesn’t consist only of its data. It also has metadata—information about the document.The three required metadata elements are as follows:document가 데이터만으로 구성되어 있지는 않다. document에 대한 정보인 metadata 도 가지고 있다. 3개의 필수 metadata는 아래와 같다._indexWhere the document livesdocument가 존재하는 장소_typeThe class of object that the document representsdocument를 대표하는 오브젝트 class_idThe unique identifier for the d..

1-03-03. Indexing a Document

Documents are indexed—stored and made searchable—by using the index API. But first, we need to decide where the document lives. As we just discussed, a document’s _index, _type, and _iduniquely identify the document. We can either provide our own _id value or let the index API generate one for us.document는 index API에 의해 색인된 (저장되고 검색 가능하도록 만들어진)다. 그러나 먼저, document를 어디에 저장할지를 결정해야 한다. 방금 이야기했듯이, d..

1-03-04. Retrieving a Document

To get the document out of Elasticsearch, we use the same _index, _type, and _id, but the HTTP verb changes to GET:Elasticsearch에서 document를 가져오기 위해서는, 동일한 _index, _type, _id 를 사용해야 한다. 그러나 HTTP verb는 GET 으로 바꾸어야 한다.GET /website/blog/123?prettyCOPY AS CURLVIEW IN SENSE The response includes the by-now-familiar metadata elements, plus the _source field, which contains the original JSON document t..