{"action":"created","issue":{"url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/68","repository_url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin","labels_url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/68/comments","events_url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/68/events","html_url":"https://github.com/ppadovani/KibanaNestedSupportPlugin/issues/68","id":321688561,"number":68,"title":"Unable to bucket by non-nested field with multiple Y-axis metrics","user":{"login":"erkserkserks","id":2941377,"avatar_url":"https://avatars3.githubusercontent.com/u/2941377?v=4","gravatar_id":"","url":"https://api.github.com/users/erkserkserks","html_url":"https://github.com/erkserkserks","followers_url":"https://api.github.com/users/erkserkserks/followers","following_url":"https://api.github.com/users/erkserkserks/following{/other_user}","gists_url":"https://api.github.com/users/erkserkserks/gists{/gist_id}","starred_url":"https://api.github.com/users/erkserkserks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erkserkserks/subscriptions","organizations_url":"https://api.github.com/users/erkserkserks/orgs","repos_url":"https://api.github.com/users/erkserkserks/repos","events_url":"https://api.github.com/users/erkserkserks/events{/privacy}","received_events_url":"https://api.github.com/users/erkserkserks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T19:02:47Z","updated_at":"2018-05-10T13:52:36Z","closed_at":null,"author_association":"NONE","body":"**Plugin version**:\r\n6.2.2-1.0.5 and 6.2.2-1.0.6\r\n\r\n**Kibana version**:\r\n6.2.2\r\n\r\n**Plugins installed**:\r\nKNQL only\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\nWhen creating visualizations with multiple Y-axis metrics, it is not possible to bucket by a non-nested field.\r\n\r\nThis seems like a regression from plugin version 6.2.2-1.0.5 to 6.2.2-1.0.6.\r\n\r\nThe test data was generated using `scripts/nested-support/genData.py`\r\n \r\n**Correct behavior (6.2.2-1.0.5) when bucketing by a non-nested field (both min and max metrics are visible):**\r\n![correct](https://user-images.githubusercontent.com/2941377/39833271-98eccd78-5397-11e8-9a65-c57b018b13a5.png)\r\n\r\nElasticsearch request body:\r\n```\r\n{\r\n  \"size\": 0,\r\n  \"_source\": {\r\n    \"excludes\": []\r\n  },\r\n  \"aggs\": {\r\n    \"3\": {\r\n      \"terms\": {\r\n        \"field\": \"cars_size\",\r\n        \"size\": 5,\r\n        \"order\": {\r\n          \"1\": \"desc\"\r\n        }\r\n      },\r\n      \"aggs\": {\r\n        \"1\": {\r\n          \"min\": {\r\n            \"field\": \"family.age\"\r\n          }\r\n        },\r\n        \"2\": {\r\n          \"max\": {\r\n            \"field\": \"family.age\"\r\n          }\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"stored_fields\": [\r\n    \"*\"\r\n  ],\r\n  \"script_fields\": {},\r\n  \"docvalue_fields\": [],\r\n  \"query\": {\r\n    \"bool\": {\r\n      \"must\": [\r\n        {\r\n          \"match_all\": {}\r\n        }\r\n      ],\r\n      \"filter\": [],\r\n      \"should\": [],\r\n      \"must_not\": []\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Incorrect behavior (6.2.2-1.0.6) when bucketing by a non-nested field (missing max metric):**\r\n![incorrect](https://user-images.githubusercontent.com/2941377/39833287-a232b8fc-5397-11e8-8ada-afa7688ceb28.png)\r\n\r\nElasticsearch request body:\r\n```\r\n{\r\n  \"size\": 0,\r\n  \"_source\": {\r\n    \"excludes\": []\r\n  },\r\n  \"aggs\": {\r\n    \"3\": {\r\n      \"terms\": {\r\n        \"field\": \"cars_size\",\r\n        \"size\": 5,\r\n        \"order\": {\r\n          \"nested_1>1\": \"desc\"\r\n        }\r\n      },\r\n      \"aggs\": {\r\n        \"2\": {\r\n          \"max\": {\r\n            \"field\": \"family.age\"\r\n          }\r\n        },\r\n        \"nested_1\": {\r\n          \"nested\": {\r\n            \"path\": \"family\"\r\n          },\r\n          \"aggs\": {\r\n            \"1\": {\r\n              \"min\": {\r\n                \"field\": \"family.age\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"stored_fields\": [\r\n    \"*\"\r\n  ],\r\n  \"script_fields\": {},\r\n  \"docvalue_fields\": [],\r\n  \"query\": {\r\n    \"bool\": {\r\n      \"must\": [\r\n        {\r\n          \"match_all\": {}\r\n        }\r\n      ],\r\n      \"filter\": [],\r\n      \"should\": [],\r\n      \"must_not\": []\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n\r\n**Errors in browser console (if relevant)**:\r\nNo errors in console"},"comment":{"url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/comments/388059694","html_url":"https://github.com/ppadovani/KibanaNestedSupportPlugin/issues/68#issuecomment-388059694","issue_url":"https://api.github.com/repos/ppadovani/KibanaNestedSupportPlugin/issues/68","id":388059694,"user":{"login":"ppadovani","id":11234684,"avatar_url":"https://avatars2.githubusercontent.com/u/11234684?v=4","gravatar_id":"","url":"https://api.github.com/users/ppadovani","html_url":"https://github.com/ppadovani","followers_url":"https://api.github.com/users/ppadovani/followers","following_url":"https://api.github.com/users/ppadovani/following{/other_user}","gists_url":"https://api.github.com/users/ppadovani/gists{/gist_id}","starred_url":"https://api.github.com/users/ppadovani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppadovani/subscriptions","organizations_url":"https://api.github.com/users/ppadovani/orgs","repos_url":"https://api.github.com/users/ppadovani/repos","events_url":"https://api.github.com/users/ppadovani/events{/privacy}","received_events_url":"https://api.github.com/users/ppadovani/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T13:52:36Z","updated_at":"2018-05-10T13:52:36Z","author_association":"OWNER","body":"Damn. I'll get it fixed pronto.\r\n\r\nSorry about that."}}
{"actor":{"display_login":"ppadovani"}}