{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/29579593","id":29579593,"diff_hunk":"@@ -659,24 +659,36 @@ public void testPlainHighlighterDocumentAnalyzer() throws Exception {\n                     .field(\"type\", \"string\")\n                     .field(\"index\", \"not_analyzed\")\n                 .endObject()\n-                .startObject(\"text\")\n+                .startObject(\"field1\")\n                     .field(\"type\", \"string\")\n                 .endObject()\n+                .startObject(\"field2\")\n+                    .field(\"type\", \"string\")\n+                    .field(\"analyzer\", \"standard\")\n+                .endObject()\n             .endObject()\n             .endObject().endObject()).execute().actionGet();\n         ensureYellow();\n \n         index(\"test\", \"type1\", \"1\",\n                 \"language_analyzer\", \"english\",\n-                \"text\", \"Look at me, I'm eating cars.\");\n+                \"field1\", \"Look at me, I'm eating cars.\",\n+                \"field2\", \"Look at me, I'm eating cars.\");\n         refresh();\n \n         SearchResponse response = client().prepareSearch(\"test\")\n-                .setQuery(QueryBuilders.matchQuery(\"text\", \"car\"))\n+                .setQuery(QueryBuilders.matchQuery(\"field1\", \"car\"))\n+                .addHighlightedField(\n+                        new HighlightBuilder.Field(\"field1\").preTags(\"<1>\").postTags(\"</1>\").requireFieldMatch(true))\n+                .get();\n+        assertHighlight(response, 0, \"field1\", 0, 1, equalTo(\"Look at me, I'm eating <1>cars</1>.\"));\n+\n+        response = client().prepareSearch(\"test\")\n+                .setQuery(QueryBuilders.matchQuery(\"field2\", \"cars\"))\n                 .addHighlightedField(\n-                        new HighlightBuilder.Field(\"text\").preTags(\"<1>\").postTags(\"</1>\").requireFieldMatch(true))\n+                        new HighlightBuilder.Field(\"field2\").preTags(\"<1>\").postTags(\"</1>\").requireFieldMatch(true))\n                 .get();\n-        assertHighlight(response, 0, \"text\", 0, 1, equalTo(\"Look at me, I'm eating <1>cars</1>.\"));\n+        assertHighlight(response, 0, \"field2\", 0, 1, equalTo(\"Look at me, I'm eating <1>cars</1>.\"));","path":"src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java","position":38,"original_position":38,"commit_id":"2a1668778ea64f45178dd3816fc41837dd86c44f","original_commit_id":"2a1668778ea64f45178dd3816fc41837dd86c44f","user":{"login":"javanna","id":832460,"avatar_url":"https://avatars.githubusercontent.com/u/832460?v=3","gravatar_id":"","url":"https://api.github.com/users/javanna","html_url":"https://github.com/javanna","followers_url":"https://api.github.com/users/javanna/followers","following_url":"https://api.github.com/users/javanna/following{/other_user}","gists_url":"https://api.github.com/users/javanna/gists{/gist_id}","starred_url":"https://api.github.com/users/javanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javanna/subscriptions","organizations_url":"https://api.github.com/users/javanna/orgs","repos_url":"https://api.github.com/users/javanna/repos","events_url":"https://api.github.com/users/javanna/events{/privacy}","received_events_url":"https://api.github.com/users/javanna/received_events","type":"User","site_admin":false},"body":"are you sure that this test fails without your fix? Seems like it still use the analyzer path, which used to work before too. I think we should write a different test for _analyzer without path defined in the mapping?","created_at":"2015-05-04T12:10:07Z","updated_at":"2015-05-04T12:10:07Z","html_url":"https://github.com/elastic/elasticsearch/pull/8943#discussion_r29579593","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/29579593"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/8943#discussion_r29579593"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943","id":26030982,"html_url":"https://github.com/elastic/elasticsearch/pull/8943","diff_url":"https://github.com/elastic/elasticsearch/pull/8943.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/8943.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/8943","number":8943,"state":"open","locked":false,"title":"Highlight: Use analyzer set on the field","user":{"login":"masaruh","id":572174,"avatar_url":"https://avatars.githubusercontent.com/u/572174?v=3","gravatar_id":"","url":"https://api.github.com/users/masaruh","html_url":"https://github.com/masaruh","followers_url":"https://api.github.com/users/masaruh/followers","following_url":"https://api.github.com/users/masaruh/following{/other_user}","gists_url":"https://api.github.com/users/masaruh/gists{/gist_id}","starred_url":"https://api.github.com/users/masaruh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaruh/subscriptions","organizations_url":"https://api.github.com/users/masaruh/orgs","repos_url":"https://api.github.com/users/masaruh/repos","events_url":"https://api.github.com/users/masaruh/events{/privacy}","received_events_url":"https://api.github.com/users/masaruh/received_events","type":"User","site_admin":false},"body":"Make highlighter use analyzer set on the field.\r\n\r\nCloses #8757","created_at":"2014-12-14T06:06:43Z","updated_at":"2015-05-04T12:10:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84ac9966b571e3cd8dde3690042a1c91fe138443","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/8943/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/2a1668778ea64f45178dd3816fc41837dd86c44f","head":{"label":"masaruh:fix/8757","ref":"fix/8757","sha":"2a1668778ea64f45178dd3816fc41837dd86c44f","user":{"login":"masaruh","id":572174,"avatar_url":"https://avatars.githubusercontent.com/u/572174?v=3","gravatar_id":"","url":"https://api.github.com/users/masaruh","html_url":"https://github.com/masaruh","followers_url":"https://api.github.com/users/masaruh/followers","following_url":"https://api.github.com/users/masaruh/following{/other_user}","gists_url":"https://api.github.com/users/masaruh/gists{/gist_id}","starred_url":"https://api.github.com/users/masaruh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaruh/subscriptions","organizations_url":"https://api.github.com/users/masaruh/orgs","repos_url":"https://api.github.com/users/masaruh/repos","events_url":"https://api.github.com/users/masaruh/events{/privacy}","received_events_url":"https://api.github.com/users/masaruh/received_events","type":"User","site_admin":false},"repo":{"id":27702700,"name":"elasticsearch","full_name":"masaruh/elasticsearch","owner":{"login":"masaruh","id":572174,"avatar_url":"https://avatars.githubusercontent.com/u/572174?v=3","gravatar_id":"","url":"https://api.github.com/users/masaruh","html_url":"https://github.com/masaruh","followers_url":"https://api.github.com/users/masaruh/followers","following_url":"https://api.github.com/users/masaruh/following{/other_user}","gists_url":"https://api.github.com/users/masaruh/gists{/gist_id}","starred_url":"https://api.github.com/users/masaruh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaruh/subscriptions","organizations_url":"https://api.github.com/users/masaruh/orgs","repos_url":"https://api.github.com/users/masaruh/repos","events_url":"https://api.github.com/users/masaruh/events{/privacy}","received_events_url":"https://api.github.com/users/masaruh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/masaruh/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/masaruh/elasticsearch","forks_url":"https://api.github.com/repos/masaruh/elasticsearch/forks","keys_url":"https://api.github.com/repos/masaruh/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/masaruh/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/masaruh/elasticsearch/teams","hooks_url":"https://api.github.com/repos/masaruh/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/masaruh/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/masaruh/elasticsearch/events","assignees_url":"https://api.github.com/repos/masaruh/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/masaruh/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/masaruh/elasticsearch/tags","blobs_url":"https://api.github.com/repos/masaruh/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/masaruh/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/masaruh/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/masaruh/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/masaruh/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/masaruh/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/masaruh/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/masaruh/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/masaruh/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/masaruh/elasticsearch/subscription","commits_url":"https://api.github.com/repos/masaruh/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/masaruh/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/masaruh/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/masaruh/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/masaruh/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/masaruh/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/masaruh/elasticsearch/merges","archive_url":"https://api.github.com/repos/masaruh/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/masaruh/elasticsearch/downloads","issues_url":"https://api.github.com/repos/masaruh/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/masaruh/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/masaruh/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/masaruh/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/masaruh/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/masaruh/elasticsearch/releases{/id}","created_at":"2014-12-08T07:16:27Z","updated_at":"2015-04-23T04:35:16Z","pushed_at":"2015-04-23T04:35:11Z","git_url":"git://github.com/masaruh/elasticsearch.git","ssh_url":"git@github.com:masaruh/elasticsearch.git","clone_url":"https://github.com/masaruh/elasticsearch.git","svn_url":"https://github.com/masaruh/elasticsearch","homepage":"http://elasticsearch.org","size":116181,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"elastic:master","ref":"master","sha":"7c20a8a913cdd640bffeab82823378c748a923d3","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-05-04T11:53:19Z","pushed_at":"2015-05-04T12:01:22Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"http://elasticsearch.org","size":349127,"stargazers_count":11038,"watchers_count":11038,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3473,"mirror_url":null,"open_issues_count":1104,"forks":3473,"open_issues":1104,"watchers":11038,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/8943"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/8943"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/8943/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/8943/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/2a1668778ea64f45178dd3816fc41837dd86c44f"}}}}