{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/196147448","pull_request_review_id":129645986,"id":196147448,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjE0NzQ0OA==","diff_hunk":"@@ -24,17 +24,23 @@\n enum MapperUtils {\n     ;\n \n-    /** Split mapper and its descendants into object and field mappers. */\n-    public static void collect(Mapper mapper, Collection<ObjectMapper> objectMappers, Collection<FieldMapper> fieldMappers) {\n+    /**\n+     * Splits the provided mapper and its descendants into object, field, and field alias mappers.\n+     */\n+    public static void collect(Mapper mapper, Collection<ObjectMapper> objectMappers,\n+                               Collection<FieldMapper> fieldMappers,\n+                               Collection<FieldAliasMapper> fieldAliasMappers) {\n         if (mapper instanceof RootObjectMapper) {\n             // root mapper isn't really an object mapper\n         } else if (mapper instanceof ObjectMapper) {\n             objectMappers.add((ObjectMapper)mapper);\n         } else if (mapper instanceof FieldMapper) {\n             fieldMappers.add((FieldMapper)mapper);\n+        } else if (mapper instanceof FieldAliasMapper) {\n+            fieldAliasMappers.add((FieldAliasMapper) mapper);\n         }","path":"server/src/main/java/org/elasticsearch/index/mapper/MapperUtils.java","position":20,"original_position":20,"commit_id":"115f1c5ecb1d9633da0759307a4646d922426e1a","original_commit_id":"115f1c5ecb1d9633da0759307a4646d922426e1a","user":{"login":"jtibshirani","id":7461306,"node_id":"MDQ6VXNlcjc0NjEzMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/7461306?v=4","gravatar_id":"","url":"https://api.github.com/users/jtibshirani","html_url":"https://github.com/jtibshirani","followers_url":"https://api.github.com/users/jtibshirani/followers","following_url":"https://api.github.com/users/jtibshirani/following{/other_user}","gists_url":"https://api.github.com/users/jtibshirani/gists{/gist_id}","starred_url":"https://api.github.com/users/jtibshirani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtibshirani/subscriptions","organizations_url":"https://api.github.com/users/jtibshirani/orgs","repos_url":"https://api.github.com/users/jtibshirani/repos","events_url":"https://api.github.com/users/jtibshirani/events{/privacy}","received_events_url":"https://api.github.com/users/jtibshirani/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2018-06-18T16:44:23Z","updated_at":"2018-06-18T16:44:24Z","html_url":"https://github.com/elastic/elasticsearch/pull/31287#discussion_r196147448","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/196147448"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/31287#discussion_r196147448"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287"}},"in_reply_to_id":195993476},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287","id":194453684,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NDUzNjg0","html_url":"https://github.com/elastic/elasticsearch/pull/31287","diff_url":"https://github.com/elastic/elasticsearch/pull/31287.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/31287.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/31287","number":31287,"state":"open","locked":false,"title":"Add basic support for field aliases in index mappings.","user":{"login":"jtibshirani","id":7461306,"node_id":"MDQ6VXNlcjc0NjEzMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/7461306?v=4","gravatar_id":"","url":"https://api.github.com/users/jtibshirani","html_url":"https://github.com/jtibshirani","followers_url":"https://api.github.com/users/jtibshirani/followers","following_url":"https://api.github.com/users/jtibshirani/following{/other_user}","gists_url":"https://api.github.com/users/jtibshirani/gists{/gist_id}","starred_url":"https://api.github.com/users/jtibshirani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtibshirani/subscriptions","organizations_url":"https://api.github.com/users/jtibshirani/orgs","repos_url":"https://api.github.com/users/jtibshirani/repos","events_url":"https://api.github.com/users/jtibshirani/events{/privacy}","received_events_url":"https://api.github.com/users/jtibshirani/received_events","type":"User","site_admin":false},"body":"Functionality covered in this PR:\r\n- Almost all parts of the search request support field aliases. In particular, aliases can be used in queries, aggregations, and sort fields, as well as when requesting `docvalue_fields`, suggestions, and highlights.\r\n- Field aliases can be used in the capabilities API.\r\n- If field names are provided as wildcards, field aliases will be matched in addition to concrete fields.\r\n- A concrete field can be added in one mappings update, and an alias added in a separate update.\r\n- If a concrete field type is updated, any aliases it has will always refer to the latest version.\r\n- Attempts to write to a field alias will cause document parsing to fail.\r\n\r\nThis PR has become quite large -- I tried to keep each commit in the PR well-scoped, but let me know if it would help to split this into smaller PRs.\r\n","created_at":"2018-06-13T02:14:38Z","updated_at":"2018-06-18T16:44:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d5972171f70c9e02981df8ba24186efc5e734d3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":141145460,"node_id":"MDU6TGFiZWwxNDExNDU0NjA=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Search/Mapping","name":":Search/Mapping","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/31287/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/115f1c5ecb1d9633da0759307a4646d922426e1a","head":{"label":"jtibshirani:feature/field-aliases","ref":"feature/field-aliases","sha":"115f1c5ecb1d9633da0759307a4646d922426e1a","user":{"login":"jtibshirani","id":7461306,"node_id":"MDQ6VXNlcjc0NjEzMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/7461306?v=4","gravatar_id":"","url":"https://api.github.com/users/jtibshirani","html_url":"https://github.com/jtibshirani","followers_url":"https://api.github.com/users/jtibshirani/followers","following_url":"https://api.github.com/users/jtibshirani/following{/other_user}","gists_url":"https://api.github.com/users/jtibshirani/gists{/gist_id}","starred_url":"https://api.github.com/users/jtibshirani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtibshirani/subscriptions","organizations_url":"https://api.github.com/users/jtibshirani/orgs","repos_url":"https://api.github.com/users/jtibshirani/repos","events_url":"https://api.github.com/users/jtibshirani/events{/privacy}","received_events_url":"https://api.github.com/users/jtibshirani/received_events","type":"User","site_admin":false},"repo":{"id":129949784,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk5NDk3ODQ=","name":"elasticsearch","full_name":"jtibshirani/elasticsearch","owner":{"login":"jtibshirani","id":7461306,"node_id":"MDQ6VXNlcjc0NjEzMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/7461306?v=4","gravatar_id":"","url":"https://api.github.com/users/jtibshirani","html_url":"https://github.com/jtibshirani","followers_url":"https://api.github.com/users/jtibshirani/followers","following_url":"https://api.github.com/users/jtibshirani/following{/other_user}","gists_url":"https://api.github.com/users/jtibshirani/gists{/gist_id}","starred_url":"https://api.github.com/users/jtibshirani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtibshirani/subscriptions","organizations_url":"https://api.github.com/users/jtibshirani/orgs","repos_url":"https://api.github.com/users/jtibshirani/repos","events_url":"https://api.github.com/users/jtibshirani/events{/privacy}","received_events_url":"https://api.github.com/users/jtibshirani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtibshirani/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jtibshirani/elasticsearch","forks_url":"https://api.github.com/repos/jtibshirani/elasticsearch/forks","keys_url":"https://api.github.com/repos/jtibshirani/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtibshirani/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtibshirani/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jtibshirani/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jtibshirani/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jtibshirani/elasticsearch/events","assignees_url":"https://api.github.com/repos/jtibshirani/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jtibshirani/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jtibshirani/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jtibshirani/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtibshirani/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtibshirani/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtibshirani/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtibshirani/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jtibshirani/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jtibshirani/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jtibshirani/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jtibshirani/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jtibshirani/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jtibshirani/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtibshirani/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtibshirani/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtibshirani/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtibshirani/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jtibshirani/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtibshirani/elasticsearch/merges","archive_url":"https://api.github.com/repos/jtibshirani/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtibshirani/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jtibshirani/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jtibshirani/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jtibshirani/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jtibshirani/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtibshirani/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jtibshirani/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jtibshirani/elasticsearch/deployments","created_at":"2018-04-17T18:41:01Z","updated_at":"2018-05-31T18:50:30Z","pushed_at":"2018-06-18T15:21:45Z","git_url":"git://github.com/jtibshirani/elasticsearch.git","ssh_url":"git@github.com:jtibshirani/elasticsearch.git","clone_url":"https://github.com/jtibshirani/elasticsearch.git","svn_url":"https://github.com/jtibshirani/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":483708,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:field-aliases","ref":"field-aliases","sha":"babb16d90cdc05b1b46d91948f7d6bf38a49bf6e","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk1MDc3NzU=","name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","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}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2018-06-18T16:07:19Z","pushed_at":"2018-06-18T16:38:28Z","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":"https://www.elastic.co/products/elasticsearch","size":491326,"stargazers_count":31824,"watchers_count":31824,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10940,"mirror_url":null,"archived":false,"open_issues_count":1458,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10940,"open_issues":1458,"watchers":31824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/31287"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/31287"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/31287/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/31287/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/115f1c5ecb1d9633da0759307a4646d922426e1a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jtibshirani"}}