{"action":"opened","issue":{"number":1382,"created_at":"2011-10-08T09:59:36Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hiya\r\n\r\nThere is a bug when providing params to a script sort.  Depending on the position of the `params` parameter in the JSON, you get 2 different error messages:\r\n\r\n    curl -XPUT 'http://127.0.0.1:9200/foo/?pretty=1' \r\n    curl -XPOST 'http://127.0.0.1:9200/foo/bar?pretty=1'  -d '\r\n    {\r\n       \"text\" : \"foo\"\r\n    }\r\n    '\r\n\r\n## Parse Failure [_script sorting requires setting the script to sort by]]; }]\r\n\r\n    curl -XGET 'http://127.0.0.1:9200/foo/_search?pretty=1'  -d '\r\n    {\r\n       \"sort\" : {\r\n          \"_script\" : {\r\n             \"params\" : {\r\n                \"one\" : 1\r\n             },\r\n             \"script\" : \"one\",\r\n             \"type\" : \"number\"\r\n          }\r\n       }\r\n    }\r\n    '\r\n\r\n    \r\n\r\n## PropertyAccessException[[Error: unresolvable property or identifier: one]\r\n\r\n    curl -XGET 'http://127.0.0.1:9200/foo/_search?pretty=1'  -d '\r\n    {\r\n       \"sort\" : {\r\n          \"_script\" : {\r\n             \"script\" : \"one\",\r\n             \"type\" : \"number\",\r\n             \"params\" : {\r\n                \"one\" : 1\r\n             }\r\n          }\r\n       }\r\n    }\r\n    '\r\n\r\n","comments":0,"title":"Script sorting doesn't accept parameters","updated_at":"2011-10-08T09:59:36Z","url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/1382","id":1851828,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d0dd23d18388ba0225bbb9bcba7ede83?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/clintongormley","id":56599,"login":"clintongormley"},"html_url":"https://github.com/elasticsearch/elasticsearch/issues/1382","labels":[],"state":"open"},"legacy":{"number":1382,"action":"opened","issue":1851828}}