我用这段代码得到了 nonodesavailableexception:
String query = "{\"phone\":\"111\"}";
User user = new User("222",null,null);
SearchOperation searchOp = new SearchOperation.Builder(BinaryValue.create(INDEX),jsonUtils.covertFromObjectToJson(user)).build();
RiakCluster cluster = RiakClient.newClient(8087, "127.0.0.1").getRiakCluster();
RiakFuture<com.basho.riak.client.core.operations.SearchOperation.Response,BinaryValue> riakFuture = cluster.execute(searchOp);
com.basho.riak.client.core.operations.SearchOperation.Response response = searchOp.get(); //Getting error in this line.
String queryString = searchOp.getQueryInfo().toString();