If you were to actually try it, you'd find it throws an exception telling you we don't support array types with the @RiakIndex annotation.
You need: @RiakIndex(name = "cars") private Set<String> cars; and adjust things accordingly. At that point, if I understand your question, yes - your index query would then return the keys for all objects (including the one shown) that have "corsa" in their set of cars. Thanks, - Roach On Mon, Aug 19, 2013 at 11:02 AM, rsb <cnasi...@gmail.com> wrote: > I am having a bit of a hard time finding resources that explain 2i > specifically with the Riak Java Client. Would anyone be kind enough to point > me to a straightforward example that I will be able to expand from. > > Assuming the following object: > > > > How can I create a secondary index on the cars that '/Mr Riak/' owns. And of > course, how could I query my bucket to retrieve all the people that own a > '/Corsa/'. > > > > > Thanks > > > > -- > View this message in context: > http://riak-users.197444.n3.nabble.com/Simple-explanation-for-2i-using-the-Java-Client-tp4028895.html > Sent from the Riak Users mailing list archive at Nabble.com. > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com