Hi Alex,
Thanks a lot for your answer.
Very often (we upgrade an application from BerkeleyDB to RIAK).
E.g.: A new key should be be the largest key + 1. Is there an other
trick to workaround this problem?
Thanks,
Markus
Gesendet: Mittwoch, 18. September 2013 um 21:53 Uhr
Von: "Alex Moore" <amo...@basho.com>
An: riak-users@lists.basho.com, "Markus Doppelbauer" <doppelba...@gmx.net>
Betreff: Re:
Von: "Alex Moore" <amo...@basho.com>
An: riak-users@lists.basho.com, "Markus Doppelbauer" <doppelba...@gmx.net>
Betreff: Re:
Hi Markus,
With Riak 1.4, 2i results are sorted in ascending order. So a range query from 0 to 99999999 or 99999999 to 0 with a max result of 1 will always return the lowest index value. In your case you may want to store the largest key # somewhere, or if you need to find it infrequently you may also try a map reduce job.
How often will you need to know this max key?
Thanks,
Alex Moore
On September 18, 2013 at 5:56:22 AM, Markus Doppelbauer (doppelba...@gmx.net) wrote:
Hello,
Is there a chance to get the biggest key of a bucket or secondary index?E.g.: A bucket (or 2i) contains the keys: 10, 20, 30, 40, 50The result should be: 50Could this problem be solved, by quering a secondary index from back, e.g.:curl http://localhost:8098/buckets/mybucket/index/field_int/99999999999/0?max_results=1Thanks a lotMarkus
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com