Secondary Indexes with ProtoBuff
russelldb at basho.com
Thu Jan 19 11:01:52 EST 2012
Which version of the client are you using?
On 19 Jan 2012, at 08:19, Gal Barnea wrote:
> 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
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.
 https://github.com/basho/riak-java-client/blob/master/src/test/java/com/megacorp/commerce/Customer.java#L37 and
> 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?
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users