I am using Java client for Riak KV 2.1.1. After creating index and applying it to Namespace, I am getting the no suitable method found error even though I am following the documentation given on the website. What is the solution for this?
Thanks.
Please see the code and the full error below.
YokozunaIndex famousIndex = new YokozunaIndex("famous", "_yz_default");
StoreIndex storeIndex = new StoreIndex.Builder(famousIndex)
.build();
client.execute(storeIndex);
Namespace streets=new Namespace("streets");
StoreBucketPropsOperation storePropsOp = new StoreBucketPropsOperation.Builder(streets)
.withSearchIndex("famous")
.build();
client.execute(storePropsOp); // this is where I am getting error
This is a documentation bug.
RiakClient.execute()
accepts an instance ofRiakCommand
, whileStoreBucketPropsOperation
is a lower-level API.Instead, use the
StoreBucketProperties
command as follows: