{"action":"created","comment":{"url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments/90811550","pull_request_review_id":11323991,"id":90811550,"diff_hunk":"@@ -1,31 +1,23 @@\n [[distrib-read]]\n-=== Retrieving a Document\n+=== 取回一个文档\n \n-A document can be retrieved from a (((\"documents\", \"retrieving\")))primary shard or from any of its replicas, as shown in <<img-distrib-read>>.\n+可以从主分片或者从其它任意副本分片检索检索文档 (((\"documents\", \"retrieving\")))，如下图所示 <<img-distrib-read>>.\n \n [[img-distrib-read]]\n-.Retrieving a single document\n-image::images/elas_0403.png[\"Retrieving a single document\"]\n+.取回单个文档\n+image::images/elas_0403.png[\"取回单个文档\"]\n \n-Here is the sequence of steps to retrieve a document from either a\n-primary or replica shard:\n+以下是从主分片或者副本分片检索文档的步骤顺序：\n \n-1. The client sends a get request to `Node 1`.\n+1、客户端向 `Node 1` 发送获取请求。\n \n-2. The node uses the document's `_id` to determine that the document\n-   belongs to shard `0`. Copies of shard `0` exist on all three nodes.\n-   On this occasion, it forwards the request to `Node 2`.\n+2、节点使用文档的 `_id` 来确定文档属于分片 `0` 。分片 `0` 的副本分片存在于所有的三个节点上。\n+   在这种情况下，它将请求转发到 `Node 2` 。\n \n-3. `Node 2` returns the document to `Node 1`, which returns the document\n-   to the client.\n+3、`Node 2` 将文档返回给 `Node 1` ，然后将文档返回给客户端。\n \n-For read requests, the coordinating node will choose a different shard copy on\n-every request in order to balance the load; it round-robins through all\n-shard copies.\n+为了读取请求，协调节点在每次请求的时候将选择不同的副本分片来达到负载均衡；通过轮询所有的副本分片。\n \n-It is possible that, while a document is being indexed, the document will\n-already be present on the primary shard but not yet copied to the replica\n-shards. In this case, a replica might report that the document doesn't exist,\n-while the primary would have returned the document successfully. Once the\n-indexing request has returned success to the user, the document will be\n-available on the primary and all replica shards.\n+在文档被检索时，已经被索引的文档可能已经存在于主分片上但是还没有复制到副本分片。\n+在这种情况下，副本分片可能会报告文档不存在，但是主分片可能成功返回文档。\n+一旦索引请求成功返回给用户，文档在主分片和副本分片都是可用的。","path":"040_Distributed_CRUD/20_Retrieving.asciidoc","position":42,"original_position":44,"commit_id":"d7fede6e206c6d6a7e9e60b36daa98a21270a78b","original_commit_id":"d7fede6e206c6d6a7e9e60b36daa98a21270a78b","user":{"login":"AlixMu","id":19337684,"avatar_url":"https://avatars.githubusercontent.com/u/19337684?v=3","gravatar_id":"","url":"https://api.github.com/users/AlixMu","html_url":"https://github.com/AlixMu","followers_url":"https://api.github.com/users/AlixMu/followers","following_url":"https://api.github.com/users/AlixMu/following{/other_user}","gists_url":"https://api.github.com/users/AlixMu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlixMu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlixMu/subscriptions","organizations_url":"https://api.github.com/users/AlixMu/orgs","repos_url":"https://api.github.com/users/AlixMu/repos","events_url":"https://api.github.com/users/AlixMu/events{/privacy}","received_events_url":"https://api.github.com/users/AlixMu/received_events","type":"User","site_admin":false},"body":"Once the indexing request has returned success to the user, the document will be available on the primary and all replica shards.\r\n一旦索引请求成功返回给用户，文档在主分片和副本分片都是可用的。\r\n这里是不是可以这样翻译：\r\n一旦索引存储请求给用户返回了成功的响应时，文档在主分片和副本分片都是可用的。","created_at":"2016-12-05T07:02:20Z","updated_at":"2016-12-05T07:06:51Z","html_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330#discussion_r90811550","pull_request_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments/90811550"},"html":{"href":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330#discussion_r90811550"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330"}}},"pull_request":{"url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330","id":90516995,"html_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330","diff_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330.diff","patch_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330.patch","issue_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/330","number":330,"state":"open","locked":false,"title":"040_Distributed_CRUD/20_Retrieving translate","user":{"login":"michealzh","id":3118930,"avatar_url":"https://avatars.githubusercontent.com/u/3118930?v=3","gravatar_id":"","url":"https://api.github.com/users/michealzh","html_url":"https://github.com/michealzh","followers_url":"https://api.github.com/users/michealzh/followers","following_url":"https://api.github.com/users/michealzh/following{/other_user}","gists_url":"https://api.github.com/users/michealzh/gists{/gist_id}","starred_url":"https://api.github.com/users/michealzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michealzh/subscriptions","organizations_url":"https://api.github.com/users/michealzh/orgs","repos_url":"https://api.github.com/users/michealzh/repos","events_url":"https://api.github.com/users/michealzh/events{/privacy}","received_events_url":"https://api.github.com/users/michealzh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-23T14:22:59Z","updated_at":"2016-12-05T07:06:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbd5d114e8f500bc51b01fe0b09034bce01cadcd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330/commits","review_comments_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330/comments","review_comment_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/330/comments","statuses_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/statuses/d7fede6e206c6d6a7e9e60b36daa98a21270a78b","head":{"label":"michealzh:chapter/chapter04_part20","ref":"chapter/chapter04_part20","sha":"d7fede6e206c6d6a7e9e60b36daa98a21270a78b","user":{"login":"michealzh","id":3118930,"avatar_url":"https://avatars.githubusercontent.com/u/3118930?v=3","gravatar_id":"","url":"https://api.github.com/users/michealzh","html_url":"https://github.com/michealzh","followers_url":"https://api.github.com/users/michealzh/followers","following_url":"https://api.github.com/users/michealzh/following{/other_user}","gists_url":"https://api.github.com/users/michealzh/gists{/gist_id}","starred_url":"https://api.github.com/users/michealzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michealzh/subscriptions","organizations_url":"https://api.github.com/users/michealzh/orgs","repos_url":"https://api.github.com/users/michealzh/repos","events_url":"https://api.github.com/users/michealzh/events{/privacy}","received_events_url":"https://api.github.com/users/michealzh/received_events","type":"User","site_admin":false},"repo":{"id":69103625,"name":"elasticsearch-definitive-guide","full_name":"michealzh/elasticsearch-definitive-guide","owner":{"login":"michealzh","id":3118930,"avatar_url":"https://avatars.githubusercontent.com/u/3118930?v=3","gravatar_id":"","url":"https://api.github.com/users/michealzh","html_url":"https://github.com/michealzh","followers_url":"https://api.github.com/users/michealzh/followers","following_url":"https://api.github.com/users/michealzh/following{/other_user}","gists_url":"https://api.github.com/users/michealzh/gists{/gist_id}","starred_url":"https://api.github.com/users/michealzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michealzh/subscriptions","organizations_url":"https://api.github.com/users/michealzh/orgs","repos_url":"https://api.github.com/users/michealzh/repos","events_url":"https://api.github.com/users/michealzh/events{/privacy}","received_events_url":"https://api.github.com/users/michealzh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michealzh/elasticsearch-definitive-guide","description":"欢迎加QQ群：109764489，贡献力量！","fork":true,"url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide","forks_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/forks","keys_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/teams","hooks_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/hooks","issue_events_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/issues/events{/number}","events_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/events","assignees_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/assignees{/user}","branches_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/branches{/branch}","tags_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/tags","blobs_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/languages","stargazers_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/stargazers","contributors_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/contributors","subscribers_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/subscribers","subscription_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/subscription","commits_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/contents/{+path}","compare_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/merges","archive_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/downloads","issues_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/issues{/number}","pulls_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/labels{/name}","releases_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/releases{/id}","deployments_url":"https://api.github.com/repos/michealzh/elasticsearch-definitive-guide/deployments","created_at":"2016-09-24T13:22:49Z","updated_at":"2016-09-24T13:22:54Z","pushed_at":"2016-10-26T14:07:09Z","git_url":"git://github.com/michealzh/elasticsearch-definitive-guide.git","ssh_url":"git@github.com:michealzh/elasticsearch-definitive-guide.git","clone_url":"https://github.com/michealzh/elasticsearch-definitive-guide.git","svn_url":"https://github.com/michealzh/elasticsearch-definitive-guide","homepage":"","size":8247,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"cn"}},"base":{"label":"elasticsearch-cn:cn","ref":"cn","sha":"6acb4e434a437514c52b76896067b406eea78e6f","user":{"login":"elasticsearch-cn","id":2517572,"avatar_url":"https://avatars.githubusercontent.com/u/2517572?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticsearch-cn","html_url":"https://github.com/elasticsearch-cn","followers_url":"https://api.github.com/users/elasticsearch-cn/followers","following_url":"https://api.github.com/users/elasticsearch-cn/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch-cn/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch-cn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch-cn/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch-cn/orgs","repos_url":"https://api.github.com/users/elasticsearch-cn/repos","events_url":"https://api.github.com/users/elasticsearch-cn/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch-cn/received_events","type":"Organization","site_admin":false},"repo":{"id":20916742,"name":"elasticsearch-definitive-guide","full_name":"elasticsearch-cn/elasticsearch-definitive-guide","owner":{"login":"elasticsearch-cn","id":2517572,"avatar_url":"https://avatars.githubusercontent.com/u/2517572?v=3","gravatar_id":"","url":"https://api.github.com/users/elasticsearch-cn","html_url":"https://github.com/elasticsearch-cn","followers_url":"https://api.github.com/users/elasticsearch-cn/followers","following_url":"https://api.github.com/users/elasticsearch-cn/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch-cn/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch-cn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch-cn/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch-cn/orgs","repos_url":"https://api.github.com/users/elasticsearch-cn/repos","events_url":"https://api.github.com/users/elasticsearch-cn/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch-cn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide","description":"欢迎加QQ群：109764489，贡献力量！","fork":true,"url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide","forks_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/forks","keys_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/teams","hooks_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/hooks","issue_events_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/events{/number}","events_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/events","assignees_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/assignees{/user}","branches_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/branches{/branch}","tags_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/tags","blobs_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/languages","stargazers_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/stargazers","contributors_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/contributors","subscribers_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/subscribers","subscription_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/subscription","commits_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/contents/{+path}","compare_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/merges","archive_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/downloads","issues_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues{/number}","pulls_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/labels{/name}","releases_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/releases{/id}","deployments_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/deployments","created_at":"2014-06-17T08:56:29Z","updated_at":"2016-12-04T10:54:17Z","pushed_at":"2016-12-05T06:53:29Z","git_url":"git://github.com/elasticsearch-cn/elasticsearch-definitive-guide.git","ssh_url":"git@github.com:elasticsearch-cn/elasticsearch-definitive-guide.git","clone_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide.git","svn_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide","homepage":"","size":10208,"stargazers_count":89,"watchers_count":89,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":93,"mirror_url":null,"open_issues_count":72,"forks":93,"open_issues":72,"watchers":89,"default_branch":"cn"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330"},"html":{"href":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/330"},"issue":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/330"},"comments":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/330/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330/comments"},"review_comment":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/330/commits"},"statuses":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/statuses/d7fede6e206c6d6a7e9e60b36daa98a21270a78b"}}}}
{"actor":{"display_login":"AlixMu"}}