Scanning a set with guaranteed order

Hello, I am attempting to paginate a scan. So I need the results of the scan to be called back in the same order every time I scan. is there a way to do something like this? I should also note I dont actually own the Set so I cannot change it.

here is what I have tried:

                ScanPolicy policy = new ScanPolicy();
                policy.concurrentNodes = false;
                policy.priority = Priority.MEDIUM;
                policy.includeBinData = true;
                policy.readModeSC = ReadModeSC.LINEARIZE;
                policy.readModeAP = ReadModeAP.ONE;
                policy.maxConcurrentNodes = 1;
                AerospikeClient.ScanAll(policy, CurrentCollection.Database, CurrentCollection.Collection, ScanCallback);

Also Tried:

foreach(var node in AerospikeClient.Nodes)
       AerospikeClient.ScanNode(policy, node.Name, CurrentCollection.Database, CurrentCollection.Collection, ScanCallback);

Note: I am using the C# driver and my current db version is 4.7.0.6

EDIT:

As a work-around I am thinking of saving a list of the keys to a file and streaming through the file to do subsuquent pages after the initial scan and getting the data by the keys rather than the scan. This will only keep it consistent to the context of the initial scan. if you query again it would refresh this list and you would start at page 1.

Would it be possible to sort any collection by key with https://www.aerospike.com/docs/guide/predicate.html? i have never used this before. is it possible to add/use this with the C# driver?

To work around I have stored all keys from the scan to a file, and on paging it uses the file as an index.

There is a feature request discussion here:

The next release is expected to provide a method to paginate.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.