riak java client

Russell Brown russell.brown at me.com
Thu Nov 17 08:49:45 EST 2011

On 17 Nov 2011, at 10:20, sergey wrote:

> Thanks Russell!
> I use raw client:
> rawClient = new RiakClient("")
> pbcClient = new PBClientAdapter(rawClient)
> riakObject = RiakObjectBuilder.newBuilder("users", userName).withContentType("application/json").withValue(userInfo).build
> pbcClient.store(riakObject)

The builder appends the UTF-8 charset if you call `withValue(String)`. I'm wondering how this causes a problem. If you do the PUT with curl and set the content-type to "application/json:charest=utf-8" does it work? What version of Riak are you using, please? Are you actually using the UTF8 charset?

> In store, Content Type application/json;charset=utf-8
> but riak search index set as:
> �hd
riak_idx_docmusersmuser1lhmvaluem+{"email":"email at email.com","pass":"123123"}lhm+{"email":"email at email.com","pass":"123123"}kjjjjdtrue
> if use curl and http and set same as
> curl -X PUT http://localhost:8098/riak/users/user1 -H "Content-Type: application/json" -d '{"email":"email at email.com", "pass":"123123"}'
> riak search index set as:
> �hd
riak_idx_docmusersmuser1lhmemailmemail at email.comlhmemail at email.comkjhmpassm123123lhm123123kjjjjdtrue
> If use java client, riak search index set all field as one sting and search query don't work("email:email at email.com")
> How to store with index riak search all fields json?
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

More information about the riak-users mailing list