I use Java Redis client "Jedis".
When getting a sorted set using zrange for example, the client specifies it returns a Set which by definition has no oredering guarantee.
this old question mentions the problem but I have found no reference to whether it is resolved.
Can I do this and know order will be preserved?
Set<String> results = jedisCli.zrange(key, start, end);
MyObject[] requestedOrderedObjects = new MyObject[results.size];
int i = 0;
foreach(String result: results) {
requestedOrderedObjects[i++] = MyObject.loadFromString(result);
}
return requestedOrderedObjects;
Thank you for any help.