Secondary index reverse sort

Jon Meredith jmeredith at basho.com
Wed Jul 31 08:26:58 EDT 2013


As a workaround, you can always store (2^31 - timestamp) as an additional
index and use that when you need to do the reverse retrieval.  Beware 2038.

Jon


On Wed, Jul 31, 2013 at 1:07 PM, Lucas Cooper <bobobo1618 at gmail.com> wrote:

> I'm happy to wait, it isn't urgently needed as my project is still in
> development.
>
> I'd contribute myself if I was confident at all programming in Erlang but
> I'm still just getting into declarative languages at the moment :)
>
>
> On Wed, Jul 31, 2013 at 10:03 PM, Russell Brown <russell.brown at mac.com>wrote:
>
>> Hi Lucas,
>>
>> I'm sorry, as easy as it would have been to add with the latest changes,
>> we just ran out of time.
>>
>> It is something I'd love to add in future. Or maybe something a
>> contributor could add? (Happy to advise / review.)
>>
>> Many thanks
>>
>> Russell
>>
>> On 31 Jul 2013, at 02:04, Lucas Cooper <bobobo1618 at gmail.com> wrote:
>>
>> > I've seen that the results of secondary index queries are sorted on
>> index values by default.
>> > I was wondering if there's something I'm missing that would allow me to
>> fetch those keys but reverse sorted.
>> >
>> > I have indexes based on UNIX timestamps and I'd like to grab the most
>> recent keys.
>> > I'd like this query to be running on demand so I'd like to avoid
>> MapReduce if at all possible.
>> >
>> >
>> > _______________________________________________
>> > riak-users mailing list
>> > riak-users at lists.basho.com
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>


-- 
Jon Meredith
VP, Engineering
Basho Technologies, Inc.
jmeredith at basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130731/d41c18c6/attachment.html>


More information about the riak-users mailing list