简体   繁体   中英

Riak Map/Reduce enableForSearch() error

I'm trying to use the Riak Java Client in an application, however I'm facing some errors. What I need is to perform a Riak Search query as input for a Map/Reduce. According to the official tutorial the search property must be enabled in the Bucket. I'm doing so, in the following code:

IRiakClient riakClient =  RiakFactory.httpClient(HTTP_CLIENT);
Bucket bucket = (Bucket) riakClient.createBucket("test-bucket").enableForSearch().execute();

When I do this, the store operation, in the Bucket, doesn't work anymore. And the following error appears:

com.basho.riak.client.RiakRetryFailedException: java.io.IOException: 500 Error:
{precommit_fail,{hook_crashed,{riak_search_kv_hook,precommit,error,badarg}}}

I've already googled the problem, but it wasn't much help!

Do you have search enabled in your app.config? Find this section

%% Riak Search Config
 {riak_search, [
            %% To enable Search functionality set this 'true'.
            {enabled, false}
           ]},

and set enabled to true.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM