Hey Joshua,

Do you know all your keys, or are they predictable? If so, you can read
them in batches and write them back with the new indicies, which will not
put the strain of list_keys on your cluster.

That said, just wanted to point out that Option #2 necessitates Option #1,
indexing of object for Search happens at write time, so enabling search
would require a read/write on all the keys of your bucket before the values
were searchable.

Tom

On Thu, Dec 27, 2012 at 12:54 PM, Joshua Barratt <[email protected]>wrote:

> Good day the list,
>
> We're getting ready to launch a riak-backed application, and starting to
> need to evolve things already. We're leaning on 2i quite a bit.
>
> The use case would be something like an 'account' object:
>
> { "id": ..., "first_name": ..., }
>
> .. where we have indexes on various fields. Now our customer service
> department wants account records to magically pop up when people call, and
> we want to add another field ('phone_number') that we'll need to do 2i on.
>
> So far the options seem to be:
>
> 1. List all the keys in the bucket (eew, I'm told) and re-save them with
> the new index
> 2. Have search enabled, and find all the objects that have that field
> defined, then re-save them with the index
> 3. I'm doing it wrong at the data modeling layer
>
> I apologize if this is an RTFM thing, I searched the list archives etc and
> found no clear suggestions.
>
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>


-- 
@tsantero <https://twitter.com/#!/tsantero>
Technical Evangelist
Basho Technologies
347-571-3995
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to