{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/26306","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/26306/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/26306/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/26306/events","html_url":"https://github.com/elastic/kibana/pull/26306","id":385020939,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MDg3NjMw","number":26306,"title":"[6.x] Move buildEsQuery to a package","user":{"login":"lukasolson","id":1178348,"node_id":"MDQ6VXNlcjExNzgzNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1178348?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasolson","html_url":"https://github.com/lukasolson","followers_url":"https://api.github.com/users/lukasolson/followers","following_url":"https://api.github.com/users/lukasolson/following{/other_user}","gists_url":"https://api.github.com/users/lukasolson/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasolson/subscriptions","organizations_url":"https://api.github.com/users/lukasolson/orgs","repos_url":"https://api.github.com/users/lukasolson/repos","events_url":"https://api.github.com/users/lukasolson/events{/privacy}","received_events_url":"https://api.github.com/users/lukasolson/received_events","type":"User","site_admin":false},"labels":[{"id":1055842724,"node_id":"MDU6TGFiZWwxMDU1ODQyNzI0","url":"https://api.github.com/repos/elastic/kibana/labels/:KibanaApp","name":":KibanaApp","color":"fef2c0","default":false},{"id":219644190,"node_id":"MDU6TGFiZWwyMTk2NDQxOTA=","url":"https://api.github.com/repos/elastic/kibana/labels/backport","name":"backport","color":"e99695","default":false},{"id":135307740,"node_id":"MDU6TGFiZWwxMzUzMDc3NDA=","url":"https://api.github.com/repos/elastic/kibana/labels/review","name":"review","color":"0052cc","default":false},{"id":1062169267,"node_id":"MDU6TGFiZWwxMDYyMTY5MjY3","url":"https://api.github.com/repos/elastic/kibana/labels/v6.6.0","name":"v6.6.0","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":{"login":"lukasolson","id":1178348,"node_id":"MDQ6VXNlcjExNzgzNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1178348?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasolson","html_url":"https://github.com/lukasolson","followers_url":"https://api.github.com/users/lukasolson/followers","following_url":"https://api.github.com/users/lukasolson/following{/other_user}","gists_url":"https://api.github.com/users/lukasolson/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasolson/subscriptions","organizations_url":"https://api.github.com/users/lukasolson/orgs","repos_url":"https://api.github.com/users/lukasolson/repos","events_url":"https://api.github.com/users/lukasolson/events{/privacy}","received_events_url":"https://api.github.com/users/lukasolson/received_events","type":"User","site_admin":false},"assignees":[{"login":"lukasolson","id":1178348,"node_id":"MDQ6VXNlcjExNzgzNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/1178348?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasolson","html_url":"https://github.com/lukasolson","followers_url":"https://api.github.com/users/lukasolson/followers","following_url":"https://api.github.com/users/lukasolson/following{/other_user}","gists_url":"https://api.github.com/users/lukasolson/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasolson/subscriptions","organizations_url":"https://api.github.com/users/lukasolson/orgs","repos_url":"https://api.github.com/users/lukasolson/repos","events_url":"https://api.github.com/users/lukasolson/events{/privacy}","received_events_url":"https://api.github.com/users/lukasolson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-11-27T22:45:49Z","updated_at":"2018-12-14T19:52:31Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/26306","html_url":"https://github.com/elastic/kibana/pull/26306","diff_url":"https://github.com/elastic/kibana/pull/26306.diff","patch_url":"https://github.com/elastic/kibana/pull/26306.patch"},"body":"Backports https://github.com/elastic/kibana/pull/23345 to 6.x.\r\n\r\nThis wasn't quite a clean backport because https://github.com/elastic/kibana/pull/15640 wasn't backported to 6.x, so we had to fix a couple of things manually.\r\n\r\nThe files that had to be manually fixed are the following:\r\n\r\n```\r\npackages/kbn-es-query/src/es_query/build_es_query.js\r\npackages/kbn-es-query/src/es_query/decorate_query.js\r\npackages/kbn-es-query/src/es_query/from_lucene.js\r\npackages/kbn-es-query/src/es_query/__tests__/from_filters.js\r\nsrc/ui/public/agg_types/buckets/_terms_other_bucket_helper.js\r\n```\r\n\r\nBasically, `fromFilters` and `fromLucene` now import `decorateQuery` instead of being passed it as an argument, and instead accept `config` as an argument, which they pass down to `decorateQuery`.\r\n\r\nSince `buildOtherBucketAgg` historically sent a noop as `decorateQuery` into `fromFilters`, it doesn't need to pass any `config`, so `decorateQuery` was updated to check if `config` is passed in, and only if it is, to decorate the query with the query string options from the config."},"comment":{"url":"https://api.github.com/repos/elastic/kibana/issues/comments/447435984","html_url":"https://github.com/elastic/kibana/pull/26306#issuecomment-447435984","issue_url":"https://api.github.com/repos/elastic/kibana/issues/26306","id":447435984,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzQzNTk4NA==","user":{"login":"elasticmachine","id":15837671,"node_id":"MDQ6VXNlcjE1ODM3Njcx","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-12-14T19:52:31Z","updated_at":"2018-12-14T19:52:31Z","author_association":"NONE","body":"## :broken_heart: Build Failed\n* [continuous-integration/kibana-ci/pull-request](https://kibana-ci.elastic.co/job/elastic+kibana+pull-request/3933/)\n\n"}}
{"actor":{"display_login":"elasticmachine"}}