I have an issue when i try to retrieve data from elasticsearch REST with the scan scroll method in Qlik Sense (QlikSense June 2017 Patch 1 - 11.11.2)
2017-08-22 18:23:36 0379 userRoles", "
2017-08-22 18:23:36 0380 "viewportPixelHeight",
2017-08-22 18:23:36 0381 "viewportPixelWidth",
2017-08-22 18:23:36 0382 "__FK__source"
2017-08-22 18:23:36 0383 FROM "_source" FK "__FK__source")
2017-08-22 18:23:36 0384 FROM "hits" PK "__KEY_hits_u0" FK "__FK_hits_u0")
2017-08-22 18:23:36 0385 FROM "hits" PK "__KEY_hits" FK "__FK_hits")
2017-08-22 18:23:36 0386 FROM JSON (wrap on) "root" PK "__KEY_root"
2017-08-22 18:23:36 0387 WITH CONNECTION(Url "http://localhost:8090/_search/scroll?scroll=1m&size=100&scroll_id=cXVlcnlUaGVuRmV0Y2g7MzQ0OzQzOTA3MTM1OnZhdjJJMHJwUU5XZ29FQ25rZWNvRXc7NDM3Mjc1ODc6b3lpczBwdjJUV2lqaVVlMnc2RFgyZzs2NjY0Njg4OkZORXhURktjUVRXTThHTnZoR1pUOEE7NDM5MDcxMzY6dmF2MkkwcnBRTldnb0VDbmtlY29Fdzs0MzkwNzEzNzp2YXYySTBycFFOV2dvRUNua2Vjb0V3OzQyMDYzNzU5OmJreElTYnU4UUpDUUtXbFVSOUF....................")
2017-08-22 18:23:36 65 fields found,
2017-08-22 18:23:36 **Error: QVX_UNEXPECTED_END_OF_DATA: Connection with server closed prematurely.**
2017-08-22 18:23:36 Execution Failed
2017-08-22 18:23:36 Execution finished.
Error: QVX_UNEXPECTED_END_OF_DATA: Connection with server closed prematurely.
Note : This error is raised only when I try to retrieve data from a large index with multiple columns (>60) and thousands of documents.
Please let me know how can i fix this error ?
Thanks
Try sending the scroll id in the body instead of as a parameter. If you are using the browser version there is a character limit on the url, which differs from browser to browser.
Therefore something like below, due to the version of elasticseach we are using we have to send it as plain text..
WITH CONNECTION(Url "$(url)", HTTPHEADER "Content-Type" "text", BODY "$(vRequestBody2)");where vRequestBody2:
let vRequestBody = '$(scrollId)' ; let vRequestBody2 = replace(vRequestBody,'"', chr(34)&chr(34));