Restrict query result size when using scan and scroll API