putScript: request [/_scripts/candidate-score] contains unrecognized parameter: [lang]
See original GitHub issue- OS: Mac 10.14.3
- npm: 6.4.1
- node: 10.15.0
- elasticsearch client: 15.4.1
- typescript: 3.3.3333
- @types/elasticsearch: 5.0.32
When calling putScript
, I’m getting this error:
request [/_scripts/candidate-score] contains unrecognized parameter: [lang]
. Looks like the lang
parameter is being set as a querystring parameter. I get the same response when replicating the call in Kibana. When calling the same request in Kibana without the querystring, getting successful response:
{
"acknowledged": true
}
Call/Logs/Responses
// Calling elasticsearch client
this.client.putScript({
id,
lang,
body: {
script: {
lang,
source
}
}
})
/*
DEBUG LOG
starting request {"method":"PUT","path":"/_scripts/candidate-score",
"body":{"script":{"lang":"painless","source":"REDACTED"}},
"query":{"lang":"painless"}}
*/
What may be causing this issue?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ElasticsearchStatusException contains unrecognized ...
The question is to keep your client's version compatible with the elastic search version, in my case I was using version 7.xx on...
Read more >weixin_39806679的博客_CSDN博客-领域博主
2021-01-11. putScript: request [/_scripts/candidate-score] contains unrecognized parameter: [lang]. 2021-01-11. Show vst parameter string.
Read more >Parameter Errors When Getting Snapshots - Elasticsearch
Hi, I'm trying to get a list of snapshots using the size and sort parameters: GET /_snapshot/<repo_name>/snapshots-*?size=2&sort=name.
Read more >Magento Category page not showing product list
Catalog Search index process unknown error: ... contains unrecognized parameter: [include_type_name]"}],"type":"illegal_argument_exception" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the submitted bug: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34513. I will close issue, thanks for your help @spalger!
Ignoring the typescript rule does the trick in getting the
putScript
method to run withoutlang
. I will submit a bug in the@types/elasticsearch
package definition and will post the issue in this thread.