{"action":"opened","number":35392,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392","id":229502925,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTAyOTI1","html_url":"https://github.com/elastic/elasticsearch/pull/35392","diff_url":"https://github.com/elastic/elasticsearch/pull/35392.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/35392.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35392","number":35392,"state":"open","locked":false,"title":"Handle IndexOrDocValuesQuery in composite aggregation","user":{"login":"jimczi","id":15977469,"node_id":"MDQ6VXNlcjE1OTc3NDY5","avatar_url":"https://avatars0.githubusercontent.com/u/15977469?v=4","gravatar_id":"","url":"https://api.github.com/users/jimczi","html_url":"https://github.com/jimczi","followers_url":"https://api.github.com/users/jimczi/followers","following_url":"https://api.github.com/users/jimczi/following{/other_user}","gists_url":"https://api.github.com/users/jimczi/gists{/gist_id}","starred_url":"https://api.github.com/users/jimczi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimczi/subscriptions","organizations_url":"https://api.github.com/users/jimczi/orgs","repos_url":"https://api.github.com/users/jimczi/repos","events_url":"https://api.github.com/users/jimczi/events{/privacy}","received_events_url":"https://api.github.com/users/jimczi/received_events","type":"User","site_admin":false},"body":"The `composite` aggregation can optimize its execution when the query\r\nis a `match_all` or a `range` over the field that is used in the first source\r\nof the aggregation. However we only check for instances of `PointRangeQuery` whereas\r\nthe range query builder creates an  `IndexOrDocValuesQuery`. This means that\r\ntoday the optimization does not apply to `range` query even if the code could handle it.\r\nThis change fixes this issue by extracting the index query inside `IndexOrDocValuesQuery`.","created_at":"2018-11-08T20:46:00Z","updated_at":"2018-11-08T20:46:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":141141324,"node_id":"MDU6TGFiZWwxNDExNDEzMjQ=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Search/Aggregations","name":":Search/Aggregations","color":"0e8a16","default":false},{"id":23174,"node_id":"MDU6TGFiZWwyMzE3NA==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Eenhancement","name":">enhancement","color":"4a4ea8","default":false},{"id":1104252481,"node_id":"MDU6TGFiZWwxMTA0MjUyNDgx","url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.5.1","name":"v6.5.1","color":"DDDDDD","default":false},{"id":1102494662,"node_id":"MDU6TGFiZWwxMTAyNDk0NjYy","url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.6.0","name":"v6.6.0","color":"dddddd","default":false},{"id":484855464,"node_id":"MDU6TGFiZWw0ODQ4NTU0NjQ=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/v7.0.0","name":"v7.0.0","color":"dddddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/35392/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/10cf6893f80e362741aaa849687b7612a385c59b","head":{"label":"jimczi:composite_index_or_docvalues_query","ref":"composite_index_or_docvalues_query","sha":"10cf6893f80e362741aaa849687b7612a385c59b","user":{"login":"jimczi","id":15977469,"node_id":"MDQ6VXNlcjE1OTc3NDY5","avatar_url":"https://avatars0.githubusercontent.com/u/15977469?v=4","gravatar_id":"","url":"https://api.github.com/users/jimczi","html_url":"https://github.com/jimczi","followers_url":"https://api.github.com/users/jimczi/followers","following_url":"https://api.github.com/users/jimczi/following{/other_user}","gists_url":"https://api.github.com/users/jimczi/gists{/gist_id}","starred_url":"https://api.github.com/users/jimczi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimczi/subscriptions","organizations_url":"https://api.github.com/users/jimczi/orgs","repos_url":"https://api.github.com/users/jimczi/repos","events_url":"https://api.github.com/users/jimczi/events{/privacy}","received_events_url":"https://api.github.com/users/jimczi/received_events","type":"User","site_admin":false},"repo":{"id":91054845,"node_id":"MDEwOlJlcG9zaXRvcnk5MTA1NDg0NQ==","name":"elasticsearch","full_name":"jimczi/elasticsearch","private":false,"owner":{"login":"jimczi","id":15977469,"node_id":"MDQ6VXNlcjE1OTc3NDY5","avatar_url":"https://avatars0.githubusercontent.com/u/15977469?v=4","gravatar_id":"","url":"https://api.github.com/users/jimczi","html_url":"https://github.com/jimczi","followers_url":"https://api.github.com/users/jimczi/followers","following_url":"https://api.github.com/users/jimczi/following{/other_user}","gists_url":"https://api.github.com/users/jimczi/gists{/gist_id}","starred_url":"https://api.github.com/users/jimczi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimczi/subscriptions","organizations_url":"https://api.github.com/users/jimczi/orgs","repos_url":"https://api.github.com/users/jimczi/repos","events_url":"https://api.github.com/users/jimczi/events{/privacy}","received_events_url":"https://api.github.com/users/jimczi/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jimczi/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jimczi/elasticsearch","forks_url":"https://api.github.com/repos/jimczi/elasticsearch/forks","keys_url":"https://api.github.com/repos/jimczi/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimczi/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimczi/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jimczi/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jimczi/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jimczi/elasticsearch/events","assignees_url":"https://api.github.com/repos/jimczi/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jimczi/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jimczi/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jimczi/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimczi/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimczi/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimczi/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimczi/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jimczi/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jimczi/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jimczi/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jimczi/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jimczi/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jimczi/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimczi/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimczi/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimczi/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimczi/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jimczi/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimczi/elasticsearch/merges","archive_url":"https://api.github.com/repos/jimczi/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimczi/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jimczi/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jimczi/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jimczi/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jimczi/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimczi/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jimczi/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jimczi/elasticsearch/deployments","created_at":"2017-05-12T05:31:39Z","updated_at":"2017-05-12T05:32:12Z","pushed_at":"2018-11-08T20:44:54Z","git_url":"git://github.com/jimczi/elasticsearch.git","ssh_url":"git@github.com:jimczi/elasticsearch.git","clone_url":"https://github.com/jimczi/elasticsearch.git","svn_url":"https://github.com/jimczi/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":469788,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"7e144b318ac34433ea971f2574723c2636c90e1b","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","private":false,"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},"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-11-08T20:42:01Z","pushed_at":"2018-11-08T20:42:10Z","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":529756,"stargazers_count":35906,"watchers_count":35906,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12123,"mirror_url":null,"archived":false,"open_issues_count":1754,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":12123,"open_issues":1754,"watchers":35906,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/35392"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/35392"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/35392/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/35392/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/10cf6893f80e362741aaa849687b7612a385c59b"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":16,"deletions":9,"changed_files":3}}
{"actor":{"display_login":"jimczi"}}