{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/16715","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/16715/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/16715/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/16715/events","html_url":"https://github.com/elastic/kibana/pull/16715","id":296871342,"number":16715,"title":"[Management] Support alias in index pattern creation","user":{"login":"chrisronline","id":56682,"avatar_url":"https://avatars1.githubusercontent.com/u/56682?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisronline","html_url":"https://github.com/chrisronline","followers_url":"https://api.github.com/users/chrisronline/followers","following_url":"https://api.github.com/users/chrisronline/following{/other_user}","gists_url":"https://api.github.com/users/chrisronline/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisronline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisronline/subscriptions","organizations_url":"https://api.github.com/users/chrisronline/orgs","repos_url":"https://api.github.com/users/chrisronline/repos","events_url":"https://api.github.com/users/chrisronline/events{/privacy}","received_events_url":"https://api.github.com/users/chrisronline/received_events","type":"User","site_admin":false},"labels":[{"id":470241819,"url":"https://api.github.com/repos/elastic/kibana/labels/:Management","name":":Management","color":"fef2c0","default":false},{"id":135307740,"url":"https://api.github.com/repos/elastic/kibana/labels/review","name":"review","color":"0052cc","default":false},{"id":810298373,"url":"https://api.github.com/repos/elastic/kibana/labels/v6.3.0","name":"v6.3.0","color":"ffffff","default":false},{"id":654061976,"url":"https://api.github.com/repos/elastic/kibana/labels/v7.0.0","name":"v7.0.0","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":{"login":"chrisronline","id":56682,"avatar_url":"https://avatars1.githubusercontent.com/u/56682?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisronline","html_url":"https://github.com/chrisronline","followers_url":"https://api.github.com/users/chrisronline/followers","following_url":"https://api.github.com/users/chrisronline/following{/other_user}","gists_url":"https://api.github.com/users/chrisronline/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisronline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisronline/subscriptions","organizations_url":"https://api.github.com/users/chrisronline/orgs","repos_url":"https://api.github.com/users/chrisronline/repos","events_url":"https://api.github.com/users/chrisronline/events{/privacy}","received_events_url":"https://api.github.com/users/chrisronline/received_events","type":"User","site_admin":false},"assignees":[{"login":"chrisronline","id":56682,"avatar_url":"https://avatars1.githubusercontent.com/u/56682?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisronline","html_url":"https://github.com/chrisronline","followers_url":"https://api.github.com/users/chrisronline/followers","following_url":"https://api.github.com/users/chrisronline/following{/other_user}","gists_url":"https://api.github.com/users/chrisronline/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisronline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisronline/subscriptions","organizations_url":"https://api.github.com/users/chrisronline/orgs","repos_url":"https://api.github.com/users/chrisronline/repos","events_url":"https://api.github.com/users/chrisronline/events{/privacy}","received_events_url":"https://api.github.com/users/chrisronline/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-02-13T20:17:27Z","updated_at":"2018-02-13T21:10:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/16715","html_url":"https://github.com/elastic/kibana/pull/16715","diff_url":"https://github.com/elastic/kibana/pull/16715.diff","patch_url":"https://github.com/elastic/kibana/pull/16715.patch"},"body":"Fixes #16705\r\n\r\nThis PR refactors `step_index_pattern` part of index pattern creation to support aliases by returning to our older double-query approach. In the [original refactor](https://github.com/elastic/kibana/pull/13454), we used two requests, one as the exact query typed by the user and one where we appended a `*`. This was used to create two lists of matches: `exact` and `partial`. During [the React refactor](https://github.com/elastic/kibana/pull/16063), the this was changed to do a single query and [attempt to figure out exact matches](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/management/sections/indices/create_index_pattern_wizard/lib/is_query_a_match.js). \r\n\r\nThis simply does not work for aliases which have no relationship to indices other than the alias definition. We're going back to the double query approach and here it is!\r\n\r\nAlso in this PR is a [readme](https://github.com/elastic/kibana/compare/master...chrisronline:fix/16705?expand=1#diff-1f31b2a7339b19cddb8db9450c217488) file that will help outline previous regressions and help to make this code more regression-proof in the future.\r\n\r\nI'm putting just 6.3 for now, but we may want to port this back into 6.2\r\n\r\n<img width=\"1324\" alt=\"screen shot 2018-02-13 at 1 51 49 pm\" src=\"https://user-images.githubusercontent.com/56682/36171581-2df64868-10d1-11e8-95ce-a675596fafa9.png\">\r\n<img width=\"1333\" alt=\"screen shot 2018-02-13 at 1 51 58 pm\" src=\"https://user-images.githubusercontent.com/56682/36171582-2e085d50-10d1-11e8-88a4-54dbe94d7a3f.png\">\r\n<img width=\"1342\" alt=\"screen shot 2018-02-13 at 1 55 57 pm\" src=\"https://user-images.githubusercontent.com/56682/36171583-2e2aa162-10d1-11e8-88c1-e36c086c3cff.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/365405106","html_url":"https://github.com/elastic/kibana/pull/16715#issuecomment-365405106","issue_url":"https://api.github.com/repos/elastic/kibana/issues/16715","id":365405106,"user":{"login":"elasticmachine","id":15837671,"avatar_url":"https://avatars3.githubusercontent.com/u/15837671?v=4","gravatar_id":"","url":"https://api.github.com/users/elasticmachine","html_url":"https://github.com/elasticmachine","followers_url":"https://api.github.com/users/elasticmachine/followers","following_url":"https://api.github.com/users/elasticmachine/following{/other_user}","gists_url":"https://api.github.com/users/elasticmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticmachine/subscriptions","organizations_url":"https://api.github.com/users/elasticmachine/orgs","repos_url":"https://api.github.com/users/elasticmachine/repos","events_url":"https://api.github.com/users/elasticmachine/events{/privacy}","received_events_url":"https://api.github.com/users/elasticmachine/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T21:10:03Z","updated_at":"2018-02-13T21:10:03Z","author_association":"NONE","body":"## :green_heart: Build Succeeded\n* [continuous-integration/kibana-ci/pull-request](https://kibana-ci.elastic.co/job/elastic-kibana-pull-request/15774/)\n\n"}}
{"actor":{"display_login":"elasticmachine"}}