@gwtony the way this works in ES SQL is that when the user asks for the next page in the cursor, we look at the results size of this page and if there are no documents in it we, on purpose, call clear scroll before returning the response to the user.
If you want to find out the number of scroll contexts alive (a cursor is basically a scroll context), you can use: GET /_nodes/stats/indices/search. In the results, search for scroll.
Thank you for the answer.
I have another question: it seems that the length of cursor id has relationship with field number, not a fixed length like scroll id. Is that a bug or designed for some reason
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.