Updated to perform sorting per primary iterator page.

USERGRID-1861