How to add a secondary index with the Java client

Jeremiah Peschka jeremiah.peschka at gmail.com
Mon Apr 8 17:31:24 EDT 2013


You can find an example of saving indexes here:
https://gist.github.com/1368756/6dc57cbdafca75eda3973dafdc1c35e1c4de08eb#file-integtest-java-L133

Where result is IRiakObject, links can be added via (from the
README<https://github.com/basho/riak-java-client>
)


result.addLink(new RiakLink("otherBucket", "otherKey", "tag"));


---
Jeremiah Peschka - Founder, Brent Ozar Unlimited
MCITP: SQL Server 2008, MVP
Cloudera Certified Developer for Apache Hadoop


On Mon, Apr 8, 2013 at 2:20 PM, Kevin Burton <rkevinburton at charter.net>wrote:

> I have the same question if you find an answer. I would also like to use a
> Java client to add links.
>
> On Apr 8, 2013, at 3:56 PM, Jeff Peck <jeffp at tnrglobal.com> wrote:
>
> > Hello,
> >
> > I have been looking through the documentation for an example of how to
> add a secondary index in Riak, using the Java client.
> >
> > I am currently storing my object (which is a HashMap) like this:
> >
> > bucket.store(key, docHashMap).execute();
> >
> > What would I need to do to add an index to that object before it gets
> stored?
> >
> > Thanks,
> > Jeff
> >
> >
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130408/b2916ffb/attachment.html>


More information about the riak-users mailing list