vikram mistry
vikram mistry

Reputation: 106

Aerospike Select Limit Java Client

How can I limit the records using java client in Aerospike. It simply scan all records. I want to limit the query only one and then fetch the next one.

Upvotes: 1

Views: 317

Answers (1)

Brian
Brian

Reputation: 276

Scans can only limit records by percent.

ScanPolicy policy = new ScanPolicy();
policy.scanPercent = 1;

client.scanAll(policy, ns, set, myCallback);

Upvotes: 0

Related Questions