This works in sense, I'm now getting the last document.
But with the PHP client I still can't get it to work properly, below is the code I'm using:
$aParams = array(
'search_type' => 'scan',
'scroll' => '30s',
'index' => 'my-index',
'type' => 'my-type',
'from' => 1900,
'size' => 25, /** we have 4 shards, so it should return 100 docs and 41 for the last page */
'body' => array(
'query' => array(
'bool' => array(
'must' => array(
array( 'match' => array( 'status' => 'active' ) ),
)
)
)
)
);