{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/20747","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20747/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20747/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20747/events","html_url":"https://github.com/elastic/elasticsearch/pull/20747","id":181033331,"number":20747,"title":"Add did you mean to strict REST params","user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:REST","name":":REST","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.0.0","name":"v5.0.0","color":"dddddd"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.1.0","name":"v5.1.0","color":"dddddd"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.0.0","name":"v6.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-04T23:49:04Z","updated_at":"2016-10-04T23:49:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20747","html_url":"https://github.com/elastic/elasticsearch/pull/20747","diff_url":"https://github.com/elastic/elasticsearch/pull/20747.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/20747.patch"},"body":"This commit adds a did you mean feature to the strict REST params error\r\nmessage. This works by comparing any unconsumed parameters to all of the\r\nconsumer parameters, comparing the Levenstein distance between those\r\nparameters, and taking any consumed parameters that are close to an\r\nunconsumed parameter as candiates for the did you mean.\r\n\r\nRelates #20722\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/251545951","html_url":"https://github.com/elastic/elasticsearch/pull/20747#issuecomment-251545951","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20747","id":251545951,"user":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T23:49:33Z","updated_at":"2016-10-04T23:49:33Z","body":"Now we have message like:\r\n\r\n```bash\r\n18:51:16 ⌂61% [jason:~/src/elastic/elasticsearch] strict-rest-params-wording(+40/-7) ± curl -XGET 'localhost:9200/_analyze?tokenzier=keyword&filter=lowercase&text=this+is+a+test&pretty=true&flied=blah'\r\n{\r\n  \"error\" : {\r\n    \"root_cause\" : [\r\n      {\r\n        \"type\" : \"illegal_argument_exception\",\r\n        \"reason\" : \"request [/_analyze] contains unrecognized parameters: [flied] -> did you mean [field]?, [tokenzier] -> did you mean [tokenizer]?\"\r\n      }\r\n    ],\r\n    \"type\" : \"illegal_argument_exception\",\r\n    \"reason\" : \"request [/_analyze] contains unrecognized parameters: [flied] -> did you mean [field]?, [tokenzier] -> did you mean [tokenizer]?\"\r\n  },\r\n  \"status\" : 400\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"jasontedor"}}