Shard 26

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-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-04-1. Routing a Document to a Shard

When you index a document, it is stored on a single primary shard. How does Elasticsearch know which shard a document belongs to? When we create a new document, how does it know whether it should store that document on shard 1 or shard 2?document를 색인하면, 특정 primary shard에 저장된다. Elasticsearch는 document가 어느 shard에 속해 있는지 어떻게 알까? 새로운 document를 생성하면, document를 shard 1 또는 2 중 어느 shard에 저장하는지 어떻게 알까?Th..

1-04-6. Multidocument Patterns

The patterns for the mget and bulk APIs are similar to those for individual documents. The difference is that the coordinating node knows in which shard each document lives. It breaks up the multidocument request into a multidocument request per shard, and forwards these in parallel to each participating node.mget 이나 bulk API의 형태는 개별 document의 그것과 유사하다. coordinating node는 document가 어느 shard에 있는지..

1-05-2. Multi-index, Multitype

Did you notice that the results from the preceding empty search contained documents of different types—user and tweet—from two different indices—us and gb?위의 empty search에서, query의 결과에 포함된 document가 2개의 다른 index(us, gb)에서 다른 type(user, tweet)을 가지고 있다는 것을 혹시 보았는가?By not limiting our search to a particular index or type, we have searched across all documents in the cluster. Elasticsearch forwarded..

1-10-03. Index Settings

There are many many knobs that you can twiddle to customize index behavior, which you can read about in the Index Modules reference documentation, but…index의 동작을 조절하기 위한, 아주 많은 변수가 있다. Index Modules reference documentation에서 참고할 수 있다. 그러나…Elasticsearch comes with good defaults. Don’t twiddle these knobs until you understand what they do and why you should change them.Elasticsearch는 좋은 기본값을 가지고 있..