-
Notifications
You must be signed in to change notification settings - Fork 726
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.3 throwing error #522
Comments
Same here. Just checked with wireshark that the HTTP request to elasticsearch contains the |
Upgrading to 13.0.0-rc1 should fix your issue |
Thanks! This fixed the issue with
|
What version of elasticsearch are you using? The es docs describe that as the required body parameter here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html |
Elasticsearch 5.3, elasticsearchjs 13.0.0-rc1. The HTTP request to elasticsearch has the scroll parameter in the URL ( |
Oh... that's unexpected. Good catch! |
Thanks, seems like our unit tests do a good job. 😉 Unfortunately, this still gives the above error message ( |
Just to confirm: passing an array for the |
@andrenarchy can you share a reproduction script? That absolutely shouldn't be the case... |
Sure, the following script fails: const elasticsearch = require('elasticsearch');
async function search() {
const client = new elasticsearch.Client({});
const result = await client.search({
index: 'documentrevisions',
size: 1,
scroll: '10m',
});
// the next line fails with the above error
const clear = await client.clearScroll({scrollId: result._scroll_id});
// this one works:
// const clear = await client.clearScroll({scrollId: [result._scroll_id]});
}
search(); |
you have to change this mapping here and this mapping here to this:
and everything should be working. (i. e. transmit a Json-Object as the request body that has the key I linked the 5.5-api-file, but the corresponding files of the other versions should be the same - just watch out to edit the file you are referring to when setting up the client. |
Why exactly was this closed? The issue I described above for |
@andrenarchy I consider this issue closed because the original issue is fixed. Could you please summarize the issue you're seeing in a new issue? |
Can confirm this issue with ElasticSearch v5.4.0 and elasticsearch-js v13.3.1, getting the same error message. |
This is still valid issue, still not working with elastic 5.5 and elasticsearch.js v13.3.1 |
when I running the code throwing error
The text was updated successfully, but these errors were encountered: