Scroll api 5.3 throwing error
See original GitHub issuevar allTitles = [];
var i =0;
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'localhost:9200',
});
// first we do a search, and specify a scroll timeout
client.search({
index: 'movies',
scroll: '30s',
size:1,
_source : 'title'
}, function getMoreUntilDone(error, response) {
// collect the title from each response
console.log('i',i++);
console.log(JSON.stringify(response));
response.hits.hits.forEach(function (hit) {
allTitles.push(hit._source.title);
});
if (response.hits.total > allTitles.length) {
// ask elasticsearch for the next set of hits from this search
client.scroll({
scrollId: response._scroll_id,
scroll: '30s',
}, getMoreUntilDone);
} else {
console.log('every "test" title', allTitles);
}
});
when I running the code throwing error
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Failed to parse request body"
}
],
"type": "illegal_argument_exception",
"reason": "Failed to parse request body",
"caused_by": {
"type": "json_parse_exception",
"reason": "Unrecognized token 'DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAHKFnV6a2NabEh4VDZLQmdzUzY0Y2tpd0EAAAAAAAAByxZ1emtjWmxIeFQ2S0Jnc1M2NGNraXdBAAAAAAAAAcwWdXprY1psSHhUNktCZ3NTNjRja2l3QQAAAAAAAAHOFnV6a2NabEh4VDZLQmdzUzY0Y2tpd0EAAAAAAAABzRZ1emtjWmxIeFQ2S0Jnc1M2NGNraXdB': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@67ba4d99; line: 1, column: 457]"
}
},
"status": 400
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Scroll api error in 5.3 - Elasticsearch - Discuss the Elastic Stack
I have implement scroll api in 5.2.2 elasticsearch. It works fine for 5.2.2 and other lower version. But It gives an above error...
Read more >ElasticSearch Scroll API not going past 10000 limit
As I said, the exception no search context for id {id} is usually being thrown because an iteration lasts longer than the scroll...
Read more >Scroll Versions for Confluence - Atlassian Marketplace
Scroll Versions for Confluence ... Server 6.2.0 - 6.15.102019-05-06Fixed Viewport search throwing an error when using versioned or translated space Download.
Read more >Changelog - Cypress Documentation
Cypress now throws an error if any Cypress commands are invoked from inside a ... This fixes an issue observed where the reporter...
Read more >Exceptions - Manual - PHP
(The variable was required prior to PHP 8.0.0.) The first catch block a thrown exception or error encounters that matches the type of...
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
Upgrading to 13.0.0-rc1 should fix your issue
This is still valid issue, still not working with elastic 5.5 and elasticsearch.js v13.3.1