riak search and basic write operations

kamiseq kamiseq at gmail.com
Tue Oct 2 18:03:06 EDT 2012

hej I am a bit confused about search functionality and basic
read/write operations.

Im using recent (1.0.6) java client and pb cluster riak client. just
for testing Im only using two local machines joined into one cluster.
storing and reading objects works fine  with key(let say I have users
bucket and I generate id from timestamp).

1. I cannot fetch objects using rest client in firefox after I store
objects using java client (I ll check with curl) but I can query for
keys in bucket (
2. I followed https://github.com/basho/riak-java-client/wiki/Using-a-custom-Converter
and I annotated one of the field with @RiakIndex(name = "user_email")
and now I tried to look-up this object with email but I got
Caused by: com.basho.riak.client.RiakException: java.io.IOException:
{"phase":"index","error":"{indexes_not_supported,riak_kv_bitcask_backend}","input":"{cover,[{1370157784997721485815954530671515330927436759040,[1370157784997721485815954530671515330927436759040]}],{<<\"users\">>,{eq,<<\"user_email_bin\">>,<<\"js at gm.com1\">>}}}","type":"result","stack":"[]"}
    at com.basho.riak.client.query.MapReduce.execute(MapReduce.java:80)
    at com.basho.riak.client.raw.pbc.PBClientAdapter.fetchIndex(PBClientAdapter.java:436)

I ve google a bit and all I could find was this
post a year old now. which points out that search needs to be enabled
in app.config file. I changed settings and restarted both machines.
but I keep getting same exception every time.
3. in same https://github.com/basho/riak-java-client/wiki/Using-a-custom-Converter
tutorial I read that default converter is not marshalling indexes,
links and metadata and it shows how to get and restore those
information back but looking into code for default converter
implementation I could find the same lines of code as in the article

Map<String, String> usermetaData =
        RiakIndexes indexes = riakIndexConverter.getIndexes(domainObject);
        Collection<RiakLink> links = riakLinksConverter.getLinks(domainObject);

        return RiakObjectBuilder.newBuilder(bucket, key)
4. can I specify data encoding it seems that it is not UTF-8
5. I also saw in app.config that vnode_vclocks is set to true, so
should I still set clientId on riak client?? I read it will be skipped
anyway now.

thanks for any comments

Paweł Kamiński

kamiseq at gmail.com
pkaminski.prv at gmail.com

More information about the riak-users mailing list