Secondary Indexes - Feedback?
siculars at gmail.com
Wed Nov 16 15:20:26 EST 2011
Because of the way riak stores a key's value as basically one big blob in one place on disk, I don't think it is possible. This is akin to the often requested ability to update a keys meta data independent of its "value". But as far as riak storage is concerned there is no real difference between meta data and "value". Well either way, for the record, I like you idea, Paul, and second it.
On Nov 16, 2011, at 3:12 PM, Paul Gross wrote:
>> - What is your wish list for the future of Secondary Indexes?
> One thing that I would like to see is the ability to add secondary indexes after the fact to existing objects. The use case I'm thinking of is:
> 1. I have a bucket of users, where the key is generated and the value is a hash of email, first name, last name, company, etc.
> 2. I add a secondary index on email so I can look up users by their email address.
> 3. Two months down the line, I want to add a feature where I can look up users by their company.
> Right now, I would have to read every document and update it with the new secondary index. It would be nice to have this feature built in, so I could just tell riak that I want create a secondary index on company. Riak would internally update all of the objects and add the index.
> Alternatively, riak could be more generic and take a function that would run in riak and update the documents without having to return them all to the client.
> Basically, before I deploy the next version of my code, I want to somehow add a secondary index to all existing objects.
> I hope this makes sense. I can clarify if needed.
> riak-users mailing list
> riak-users at lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users