Secondary Indexes with ProtoBuff
gal at eyeviewdigital.com
Thu Jan 19 13:14:35 EST 2012
Thanks for the quick response and detailed explanation
I am using 1.0.2, so I will give it a try soon
On Thu, Jan 19, 2012 at 6:01 PM, Russell Brown <russelldb at basho.com> wrote:
> Hi Gal,
> Which version of the client are you using?
> On 19 Jan 2012, at 08:19, Gal Barnea wrote:
> > Hi
> > Is there a way to insert 2i fields using the PB Java client?
> Yes, if you're using the current 1.0.x version.
> The way to do it is to add the indexes to the object you're storing. So if
> you're storing an IRiakObject then using the builder, or straight on the
> IRiakObject, just call
> addIndex(name, value);
> If you're storing some domain object (using the JSON converter) then you
> can annotate fields with the @RiakIndex annotation.
> There's an example of both in the tests for the client.
> > It seems that this is not possible, so I'm wondering what kind of
> workarounds exists
> > Is this something that can be done in a Post-Commit hook? if so, will
> inserts still be faster than the HTTP interface?
> > Thanks
> > Gal
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users