{"action":"created","comment":{"url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments/56180750","id":56180750,"diff_hunk":"@@ -1,116 +1,92 @@\n [[language-pitfalls]]\n-=== Pitfalls of Mixing Languages\n+=== 混合语言陷阱\n \n-If you have to deal with only a single language,(((\"languages\", \"mixing, pitfalls of\"))) count yourself lucky.\n-Finding the right strategy for handling documents written in several languages\n-can be challenging.(((\"indexing\", \"mixed languages, pitfalls of\")))\n+如果你只需要处理一种语言，那么算你走运，找到一个正确的策略用于处理多语言文档是一项巨大的挑战。(((\"indexing\", \"mixed languages, pitfalls of\")))\n \n-==== At Index Time\n+==== 在索引的时候\n \n-Multilingual documents come in three main varieties:\n+多语言文档主要有以下三个类型：\n \n- * One predominant language per _document_, which may contain snippets from\n-   other languages (See <<one-lang-docs>>.)\n- * One predominant language per _field_, which may contain snippets from\n-   other languages (See <<one-lang-fields>>.)\n- * A mixture of languages per field (See <<mixed-lang-fields>>.)\n+ * 一种是每份 _document_ （文档）有自己的主语言，并包含一些其他语言的片段（参考 <<one-lang-docs>>。）\n+ * 一种是每个 _field_ （域）有自己的主语音, 并包含一些其他语言的（参考 <<one-lang-fields>>。）\n+ * 一种是每个 _field_ （域）都是混合语言（参考 <<mixed-lang-fields>>。）\n \n-The goal, although not always achievable, should be to keep languages\n-separate.  Mixing languages in the same inverted index can be problematic.\n \n-===== Incorrect stemming\n+将每种语言的分隔开，这点并不是每次都能实现。在同一份倒排索引里含有混合语言是一个大问题。\n \n-The stemming rules for German are different from those for English, French,\n-Swedish, and so on.(((\"stemming words\", \"incorrect stemming in multilingual documents\"))) Applying the same stemming rules to different languages\n-will result in some words being stemmed correctly, some  incorrectly, and some\n-not being stemmed at all. It may even result in words from different languages with different meanings\n-being stemmed to the same root word, conflating their meanings and producing\n-confusing search results for the user.\n+===== 不合理的切词为词根\n \n-Applying multiple stemmers in turn to the same text is likely to result in\n-rubbish, as the next stemmer may try to stem an already stemmed word,\n-compounding the problem.\n+\n+德语的切词为词根的规则跟英语，法语，瑞典语等是不一样的。(((\"stemming words\", \"incorrect stemming in multilingual documents\")))为不同的语言提供同样的切词为词根的规则，\n+将会导致有的词的词根找的正确，有的词的词根找的不正确，有的词根本找不到词根。 甚至是将不同语言的不同含义的词切为同一个词根。合并这些词根的搜索结果会给用户带来困恼。\n+\n+\n+提供多种切词为词根的规则轮流切分同一份文档的结果很有可能得到一堆垃圾，因为下一个切词为词根的规则会尝试切分一个已经被切为词根的单词，这加剧了上面提到的问题。\n \n [[different-scripts]]\n-.Stemmer per Script\n+","path":"200_Language_intro/30_Language_pitfalls.asciidoc","position":51,"original_position":51,"commit_id":"e451ccd8ce44564cb301b40e2857425df1e7acf8","original_commit_id":"e451ccd8ce44564cb301b40e2857425df1e7acf8","user":{"login":"biyuhao","id":1197310,"avatar_url":"https://avatars.githubusercontent.com/u/1197310?v=3","gravatar_id":"","url":"https://api.github.com/users/biyuhao","html_url":"https://github.com/biyuhao","followers_url":"https://api.github.com/users/biyuhao/followers","following_url":"https://api.github.com/users/biyuhao/following{/other_user}","gists_url":"https://api.github.com/users/biyuhao/gists{/gist_id}","starred_url":"https://api.github.com/users/biyuhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biyuhao/subscriptions","organizations_url":"https://api.github.com/users/biyuhao/orgs","repos_url":"https://api.github.com/users/biyuhao/repos","events_url":"https://api.github.com/users/biyuhao/events{/privacy}","received_events_url":"https://api.github.com/users/biyuhao/received_events","type":"User","site_admin":false},"body":"多余的空行。","created_at":"2016-03-15T15:18:33Z","updated_at":"2016-03-15T15:18:33Z","html_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13#discussion_r56180750","pull_request_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/comments/56180750"},"html":{"href":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13#discussion_r56180750"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13","id":61670786,"html_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13","diff_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13.diff","patch_url":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13.patch","issue_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/13","number":13,"state":"open","locked":false,"title":"chapter18_part2: /200_Language_intro/20_Configuring.asciidoc","user":{"login":"lxy4java","id":5848244,"avatar_url":"https://avatars.githubusercontent.com/u/5848244?v=3","gravatar_id":"","url":"https://api.github.com/users/lxy4java","html_url":"https://github.com/lxy4java","followers_url":"https://api.github.com/users/lxy4java/followers","following_url":"https://api.github.com/users/lxy4java/following{/other_user}","gists_url":"https://api.github.com/users/lxy4java/gists{/gist_id}","starred_url":"https://api.github.com/users/lxy4java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxy4java/subscriptions","organizations_url":"https://api.github.com/users/lxy4java/orgs","repos_url":"https://api.github.com/users/lxy4java/repos","events_url":"https://api.github.com/users/lxy4java/events{/privacy}","received_events_url":"https://api.github.com/users/lxy4java/received_events","type":"User","site_admin":false},"body":"配置分词器","created_at":"2016-03-04T06:01:18Z","updated_at":"2016-03-15T15:18:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4c416288c78ea6fd06b764749bc8a9d08cf9ef7","assignee":{"login":"biyuhao","id":1197310,"avatar_url":"https://avatars.githubusercontent.com/u/1197310?v=3","gravatar_id":"","url":"https://api.github.com/users/biyuhao","html_url":"https://github.com/biyuhao","followers_url":"https://api.github.com/users/biyuhao/followers","following_url":"https://api.github.com/users/biyuhao/following{/other_user}","gists_url":"https://api.github.com/users/biyuhao/gists{/gist_id}","starred_url":"https://api.github.com/users/biyuhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biyuhao/subscriptions","organizations_url":"https://api.github.com/users/biyuhao/orgs","repos_url":"https://api.github.com/users/biyuhao/repos","events_url":"https://api.github.com/users/biyuhao/events{/privacy}","received_events_url":"https://api.github.com/users/biyuhao/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13/commits","review_comments_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13/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/13/comments","statuses_url":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/statuses/e451ccd8ce44564cb301b40e2857425df1e7acf8","head":{"label":"lxy4java:chapter/chapter18_part2","ref":"chapter/chapter18_part2","sha":"e451ccd8ce44564cb301b40e2857425df1e7acf8","user":{"login":"lxy4java","id":5848244,"avatar_url":"https://avatars.githubusercontent.com/u/5848244?v=3","gravatar_id":"","url":"https://api.github.com/users/lxy4java","html_url":"https://github.com/lxy4java","followers_url":"https://api.github.com/users/lxy4java/followers","following_url":"https://api.github.com/users/lxy4java/following{/other_user}","gists_url":"https://api.github.com/users/lxy4java/gists{/gist_id}","starred_url":"https://api.github.com/users/lxy4java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxy4java/subscriptions","organizations_url":"https://api.github.com/users/lxy4java/orgs","repos_url":"https://api.github.com/users/lxy4java/repos","events_url":"https://api.github.com/users/lxy4java/events{/privacy}","received_events_url":"https://api.github.com/users/lxy4java/received_events","type":"User","site_admin":false},"repo":{"id":52758805,"name":"elasticsearch-definitive-guide","full_name":"lxy4java/elasticsearch-definitive-guide","owner":{"login":"lxy4java","id":5848244,"avatar_url":"https://avatars.githubusercontent.com/u/5848244?v=3","gravatar_id":"","url":"https://api.github.com/users/lxy4java","html_url":"https://github.com/lxy4java","followers_url":"https://api.github.com/users/lxy4java/followers","following_url":"https://api.github.com/users/lxy4java/following{/other_user}","gists_url":"https://api.github.com/users/lxy4java/gists{/gist_id}","starred_url":"https://api.github.com/users/lxy4java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxy4java/subscriptions","organizations_url":"https://api.github.com/users/lxy4java/orgs","repos_url":"https://api.github.com/users/lxy4java/repos","events_url":"https://api.github.com/users/lxy4java/events{/privacy}","received_events_url":"https://api.github.com/users/lxy4java/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lxy4java/elasticsearch-definitive-guide","description":"","fork":true,"url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide","forks_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/forks","keys_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/teams","hooks_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/hooks","issue_events_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/issues/events{/number}","events_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/events","assignees_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/assignees{/user}","branches_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/branches{/branch}","tags_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/tags","blobs_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/languages","stargazers_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/stargazers","contributors_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/contributors","subscribers_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/subscribers","subscription_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/subscription","commits_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/contents/{+path}","compare_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/merges","archive_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/downloads","issues_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/issues{/number}","pulls_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/labels{/name}","releases_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/releases{/id}","deployments_url":"https://api.github.com/repos/lxy4java/elasticsearch-definitive-guide/deployments","created_at":"2016-02-29T02:42:38Z","updated_at":"2016-02-29T02:42:40Z","pushed_at":"2016-03-15T05:20:19Z","git_url":"git://github.com/lxy4java/elasticsearch-definitive-guide.git","ssh_url":"git@github.com:lxy4java/elasticsearch-definitive-guide.git","clone_url":"https://github.com/lxy4java/elasticsearch-definitive-guide.git","svn_url":"https://github.com/lxy4java/elasticsearch-definitive-guide","homepage":null,"size":7222,"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":"master"}},"base":{"label":"elasticsearch-cn:cn","ref":"cn","sha":"3e31f3ed1ef596586c0eada5688576595da9684d","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":"欢迎加群：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-03-14T00:34:50Z","pushed_at":"2016-03-15T05:20:19Z","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":7278,"stargazers_count":20,"watchers_count":20,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":34,"forks":30,"open_issues":34,"watchers":20,"default_branch":"cn"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13"},"html":{"href":"https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/pull/13"},"issue":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/13"},"comments":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/pulls/13/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/13/commits"},"statuses":{"href":"https://api.github.com/repos/elasticsearch-cn/elasticsearch-definitive-guide/statuses/e451ccd8ce44564cb301b40e2857425df1e7acf8"}}}}