client.execute(sv);
// Sleep some more or ... yeah, it doesn't work.
Thread.sleep(3000);
SearchMapReduce smr = new SearchMapReduce.Builder()
.withIndex(index.getName())
.withQuery("NOT leader_b:true")
.withMapPhase(Function.newAnonymousJsFunction("function(v) { return [1]; }"), false)
.withReducePhase(Function.newNamedJsFunction("Riak.reduceSum"), true)
.build();