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);
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 220.127.116.11
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?