{"action":"opened","issue":{"url":"https://api.github.com/repos/danpaz/bodybuilder/issues/34","repository_url":"https://api.github.com/repos/danpaz/bodybuilder","labels_url":"https://api.github.com/repos/danpaz/bodybuilder/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/danpaz/bodybuilder/issues/34/comments","events_url":"https://api.github.com/repos/danpaz/bodybuilder/issues/34/events","html_url":"https://github.com/danpaz/bodybuilder/issues/34","id":162383845,"number":34,"title":"Script Fields on Aggregation","user":{"login":"essajiwa","id":625072,"avatar_url":"https://avatars.githubusercontent.com/u/625072?v=3","gravatar_id":"","url":"https://api.github.com/users/essajiwa","html_url":"https://github.com/essajiwa","followers_url":"https://api.github.com/users/essajiwa/followers","following_url":"https://api.github.com/users/essajiwa/following{/other_user}","gists_url":"https://api.github.com/users/essajiwa/gists{/gist_id}","starred_url":"https://api.github.com/users/essajiwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/essajiwa/subscriptions","organizations_url":"https://api.github.com/users/essajiwa/orgs","repos_url":"https://api.github.com/users/essajiwa/repos","events_url":"https://api.github.com/users/essajiwa/events{/privacy}","received_events_url":"https://api.github.com/users/essajiwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-27T06:44:29Z","updated_at":"2016-06-27T06:44:29Z","closed_at":null,"body":"Is there currently a way to use `scripts` properties instead of `fields` on aggregation? like the following example :\r\n\r\n` \"aggs\": {\r\n                \"Balance\": {\r\n                  \"sum\": {\r\n                    \"script\": \"doc['DEBIT_DC'].value + doc['CREDIT_DC'].value\",\r\n                    \"lang\": \"expression\"\r\n                  }\r\n                }\r\n              }`"}}
{"actor":{"display_login":"essajiwa"}}