Carson,

Unfortunately the PB interface, as you discovered, doesn't support all the 
bucket properties. You could, however, also use the riak-erlang-http-client 
which has full support for all bucket properties. We realize this is a pain 
point and will be working to improve the PB interface in the near future.  To 
enable the precommit hook, do something like this with the HTTP client:

Client = rhc:create(), %% use create/4 if you're not connecting to localhost
rhc:set_bucket(Client, "my_bucket", [{<<"precommit">>, [
  {struct, [{<<"mod">>, <<"riak_search_kv_hook">>}, {<<"fun">>, 
<<"precommit">>}]}
   ]}]).

Sean Cribbs <s...@basho.com>
Developer Advocate
Basho Technologies, Inc.
http://basho.com/

On Dec 14, 2010, at 12:39 PM, carson li wrote:

> hey everyone,
> 
> i'm trying to figure out if it's possible to enable the precommit hook for a 
> riak bucket using the erlang library.  i know you can do it from a curl 
> statement, or using the "search-cmd install".  it also states on the 
> pb-client that there's only suport for modifying 2 bucket properties, which 
> is n_val, and allow_multi.  
> 
> i was just wondering if you guys know of, or have found any work arounds to 
> turn on riak search for a KV bucket. (i'm trying to create a bucket and then 
> turn on the indexing from my application) 
> 
> Please let me know. Thanks in advance.
> 
> -- 
> Carson Li
> Liquid Analytics
> carson...@liquidanalytics.com
> 647-273-1024
> 
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to