5.2 clearScroll spec fails
See original GitHub issueclearScroll function doesn’t work as expected when using it with elastic version 5.2, when passing the scroll id it blows up and sends an error saying unknown parameter in the request body, when we use an older commit of the 5.2 api featuring just “paramAsBody:‘scrollId’” everything works as expected.
Im not sure why its not working correctly, but I can get it to function properly by reverting the api.clearScroll to an older commit.
5.2 6/21/17 commit
api.clearScroll = ca({ urls: [ { fmt: '/_search/scroll/<%=scrollId%>', req: { scrollId: { type: 'list' } } }, { fmt: '/_search/scroll' } ], paramAsBody: 'scrollId', method: 'DELETE' });
paramAsBody: ‘scrollId’
5.2 7/31/17 commit
api.clearScroll = ca({ urls: [ { fmt: '/_search/scroll/<%=scrollId%>', req: { scrollId: { type: 'list' } } }, { fmt: '/_search/scroll' } ], paramAsBody: { param: 'scrollId', body: 'scroll_id' }, method: 'DELETE' });
paramAsBody: { param: ‘scrollId’, body: ‘scroll_id’ }
Error Received
{ error: { reason: Unknown parameter [scroll_id] in request body or parameter is of the wrong type[VALUE_STRING] , root_cause: [ { reason: Unknown parameter [scroll_id] in request body or parameter is of the wrong type[VALUE_STRING] , type: illegal_argument_exception } ], type: illegal_argument_exception }, status: 400 }
Even when testing it in Kibana with the test code taken straight from the docs it still fails to work.
elasticsearch-js works as expected from 5.3^
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Hey, thanks for the quick response. I used the new fix and it worked perfectly! Thanks again! @spalger
Just published the changes in v14.2.2