The update API , as shown in Figure 11, “document의 부분적 업데이트”, combines the read and write patterns explained previously.
Figure 11, “document의 부분적 업데이트”에서 보듯이, update API는 위에서 설명한 읽기와 쓰기 형태의 의 조합이다.
Here is the sequence of steps used to perform a partial update on a document:
document의 부분적인 업데이트를 수행하는데 사용되는 일련의 과정을 나열하였다.
The client sends an update request to
Node 1.클라이언트가 업데이트 request를
Node 1로 보낸다.It forwards the request to
Node 3, where the primary shard is allocated.request는 primary shard가 할당되어 있는
Node 3으로 전송된다.Node 3retrieves the document from the primary shard, changes the JSON in the_sourcefield, and tries to reindex the document on the primary shard. If the document has already been changed by another process, it retries step 3 up toretry_on_conflicttimes, before giving up.Node 3은 primary shard로부터 document를 가져와,_sourcefield에 있는 JSON을 변경하고, primary shard의 document를 다시 색인하려 시도한다. 만약 document가 다른 프로세스에 의해 이미 변경되었다면, 그만두기 전에,retry_on_conflict에 정의된 횟수만큼, 단계 3을 반복한다.If
Node 3has managed to update the document successfully, it forwards the new version of the document in parallel to the replica shards onNode 1andNode 2to be reindexed. Once all replica shards report success,Node 3reports success to the coordinating node, which reports success to the client.Node 3이 document를 성공적으로 업데이트했다면, 재색인할 수 있도록Node 1과Node 2에 있는 replica shard로 병렬로 document의 새로운 버전을 전달한다. 모든 replica shard가 성공했다고 보고하면,Node 3는 coordinating node(node 1)에게 성공했다고 보고하고, Node 1은 클라이언트에게 성공을 보고한다.
The update API also accepts the routing, consistency, and timeout parameters that are explained in Creating, Indexing, and Deleting a Document.
update API 또한 Creating, Indexing, and Deleting a Document에서 설명한, routing, consistency, 그리고 timeout 매개변수를 사용할 수 있다.
'2.X > 1. Getting Started' 카테고리의 다른 글
| 1-04-3. Creating, Indexing, and Deleting a Document (0) | 2017.10.01 |
|---|---|
| 1-04-4. Retrieving a Document (0) | 2017.10.01 |
| 1-04-6. Multidocument Patterns (0) | 2017.09.30 |
| 1-05. Searching—The Basic Tools (0) | 2017.09.30 |
| 1-05-1. The Empty Search (0) | 2017.09.30 |
