{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/23824","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23824/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23824/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23824/events","html_url":"https://github.com/elastic/elasticsearch/issues/23824","id":218202311,"number":23824,"title":"Better handling of inline scripts in ingest","user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars3.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"labels":[{"id":268963484,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Ingest","name":":Ingest","color":"009800","default":false},{"id":110815527,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/adoptme","name":"adoptme","color":"207de5","default":false},{"id":23174,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8","default":true},{"id":92913858,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/low%20hanging%20fruit","name":"low hanging fruit","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-30T13:45:46Z","updated_at":"2017-04-25T22:44:28Z","closed_at":null,"body":"Anywhere that scripts are used, we allow writing an inline script in a short form, eg:\r\n\r\n    { \"script\": {\r\n        \"lang\": \"painless\",\r\n        \"inline\": \"ctx.foo='bar'\r\n    }}\r\n\r\ncan also be written as:\r\n\r\n    { \"script\": \"ctx.foo='bar'\"}\r\n\r\nIf I try this in ingest:\r\n\r\n```\r\nPOST _ingest/pipeline/_simulate\r\n{\r\n  \"pipeline\": {\r\n    \"processors\": [\r\n      {\r\n        \"script\": \"ctx.foo='bar'\"\r\n      }\r\n    ]\r\n  },\r\n  \"docs\": [\r\n    {\r\n      \"_index\": \"t\",\r\n      \"_type\": \"t\",\r\n      \"_id\": \"1\",\r\n      \"_source\": {}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nI get:\r\n\r\n```\r\n     {\r\n        \"type\": \"class_cast_exception\",\r\n        \"reason\": \"java.lang.String cannot be cast to java.util.Map\"\r\n      }\r\n```\r\n\r\nWhile I understand that all processors expect an object and so the short form may not be supported (although it'd be nice to make an exception for scripts), we should at least have an exception which is easier to understand."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/297186624","html_url":"https://github.com/elastic/elasticsearch/issues/23824#issuecomment-297186624","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/23824","id":297186624,"user":{"login":"asettouf","id":6400458,"avatar_url":"https://avatars0.githubusercontent.com/u/6400458?v=3","gravatar_id":"","url":"https://api.github.com/users/asettouf","html_url":"https://github.com/asettouf","followers_url":"https://api.github.com/users/asettouf/followers","following_url":"https://api.github.com/users/asettouf/following{/other_user}","gists_url":"https://api.github.com/users/asettouf/gists{/gist_id}","starred_url":"https://api.github.com/users/asettouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asettouf/subscriptions","organizations_url":"https://api.github.com/users/asettouf/orgs","repos_url":"https://api.github.com/users/asettouf/repos","events_url":"https://api.github.com/users/asettouf/events{/privacy}","received_events_url":"https://api.github.com/users/asettouf/received_events","type":"User","site_admin":false},"created_at":"2017-04-25T22:44:28Z","updated_at":"2017-04-25T22:44:28Z","body":"Hello,\r\n\r\n@Dimitrees are you still working on it, or can I pick it up?\r\n\r\nThanks,\r\n\r\nAdonis"}}
{"actor":{"display_login":"asettouf"}}