ASCENDING
Content copied to clipboard
Sort the results by document ID in lexicographic order.
Reasonably efficient. Suitable for large range scans, since it does not require buffering the entire result set in memory.
CAVEAT: When used with a ScanType.sample scan, the behavior is unspecified and may change in a future version. Likely outcomes include:
Skewing the results towards "low" document IDs.
Not actually sorting.
If you require sorted results from a sample scan, please use ScanSort.NONE, then collect the results into a list and sort the list.