-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll api 5.0, 5.1, 5.2 throwing error against elastic search 5.3+ #573
Comments
Wait, is the apiVersion we set in the client supposed to always match the version of elasticsearch you're connecting to? If so, does upgrading elasticsearch always require a version bump in the config of the client code and downtime of the app? |
As far as I can tell, the string only body was last in the docs on version 1.7, all newer versions show using the json body. Maybe all the api specs need to be updated then? Do we need to update
to match elasticsearch-js/src/lib/apis/5_3.js Lines 5836 to 5864 in e2897da
|
After much digging, I think this is the change that needs to be made (followed by a diff --git i/scripts/generate/overrides.js w/scripts/generate/overrides.js
index fd8aa9c..2607852 100644
--- i/scripts/generate/overrides.js
+++ w/scripts/generate/overrides.js
@@ -252,7 +252,7 @@ function (spec) {
}
},
{
- version: '>=5.3',
+ version: '>=2.0',
paramAsBody: {
scroll: {
param: 'scrollId', What do you think @spalger? Do you happen to remember why you had it as 5.3+ before |
I did that as 5.3+ because elastic/elasticsearch#22691 went into 5.3, but that's unfortunate that this doesn't work in 5.0+... I really need to get the functional tests for the client up and running again |
Are you sure that should be |
@spalger I went with
and the 2.0 and up docs all support the json version
And the note about for backwards compatibly My opinion is 2.0 -> 2.4 should use the json body version instead of the backwards compatible version since they support both styles, but you are obviously much closer to the project, so I'll defer to your expertise. Would you like me to make the PR for this change? If so should I use Thanks so much for taking a look at this! |
Nice, sounds like a valid reason to me! A PR would be very helpful, and |
Should I include the output of |
@kjg I actually run it manually but like to keep it separate from the PRs. Thanks again! |
When I use the 5.0, 5.1, 5.2 scroll API from elasticsearch-js 13.1.1 or 13.2.0 against elasticsearch versions 5.3 and up I get the error
Error: [illegal_argument_exception] Failed to parse request body
In this case the request body is just a plain string which is the scroll id, not a json payload of form
{scrollId: scrollId}
Does elasticsearch 5.3 not allow for requests via API 5.0, 5.1, 5.2, or do those API definitions need to be updated, or any idea what I might be doing wrong here?
The text was updated successfully, but these errors were encountered: