{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/10598","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10598/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10598/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10598/events","html_url":"https://github.com/elastic/elasticsearch/issues/10598","id":68533807,"number":10598,"title":"scripts do not properly support multiple file types","user":{"login":"jdconrad","id":2126764,"avatar_url":"https://avatars.githubusercontent.com/u/2126764?v=3","gravatar_id":"","url":"https://api.github.com/users/jdconrad","html_url":"https://github.com/jdconrad","followers_url":"https://api.github.com/users/jdconrad/followers","following_url":"https://api.github.com/users/jdconrad/following{/other_user}","gists_url":"https://api.github.com/users/jdconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/jdconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdconrad/subscriptions","organizations_url":"https://api.github.com/users/jdconrad/orgs","repos_url":"https://api.github.com/users/jdconrad/repos","events_url":"https://api.github.com/users/jdconrad/events{/privacy}","received_events_url":"https://api.github.com/users/jdconrad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-15T00:24:22Z","updated_at":"2015-04-15T12:47:07Z","closed_at":null,"body":"In the onFileInit method as part of the class ScriptService it appears that an assumption is made that there will always only be one type of file for each of the ScriptServiceEngines that is available.  This can be simplified by only allowing one type of file per ScriptServiceEngine since that assumption is already made anyway."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/93377340","html_url":"https://github.com/elastic/elasticsearch/issues/10598#issuecomment-93377340","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10598","id":93377340,"user":{"login":"javanna","id":832460,"avatar_url":"https://avatars.githubusercontent.com/u/832460?v=3","gravatar_id":"","url":"https://api.github.com/users/javanna","html_url":"https://github.com/javanna","followers_url":"https://api.github.com/users/javanna/followers","following_url":"https://api.github.com/users/javanna/following{/other_user}","gists_url":"https://api.github.com/users/javanna/gists{/gist_id}","starred_url":"https://api.github.com/users/javanna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javanna/subscriptions","organizations_url":"https://api.github.com/users/javanna/orgs","repos_url":"https://api.github.com/users/javanna/repos","events_url":"https://api.github.com/users/javanna/events{/privacy}","received_events_url":"https://api.github.com/users/javanna/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T12:47:07Z","updated_at":"2015-04-15T12:47:07Z","body":"Hi @jdconrad you mean [here](https://github.com/elastic/elasticsearch/blob/master/src/main/java/org/elasticsearch/script/ScriptService.java#L486)? If that's the case that is not the assumption we are making there, we have to pick one type, which one doesn't matter, the call will return the same result for the same engine.\r\n\r\nI am all for simplifying this in master, but I think we properly support multiple types, this is not a bug. The only script engine that I can remember which supports multiple types is javascript (`js` and `javascript`), maybe we want to change that at some point and change the `ScriptEngineService` interface but that's a breaking change for every script engine plugin."}}