Also note that on 1.0 and later you can set the "search" bucket property to
true and that will install the hook for you.

On Wed, Jan 25, 2012 at 9:51 AM, charlesugwuh <char...@contentomni.com>wrote:

> I figured this out.
>
> So I'm using the  https://github.com/basho/riak-php-client PHP Riak
> Client .
> I was using the setProperties method to set the commit hooks for the bucket
> to enable search.
>
> However, I was defining the bucket properties like so: '$prop_arr =
> array('precommit' => array('mod' => 'riak_search_kv_hook', 'fun' =>
> 'precommit'));' instead of like so: '$prop_arr = array('precommit' =>
> array(array('mod' => 'riak_search_kv_hook', 'fun' => 'precommit')));'.
>
> It's a very subtle difference but the first one creates this:
> '{"props":{"precommit":{"mod":"riak_search_kv_hook","fun":"precommit"}}}'
> while the second creates this
>
> '{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}]}}'.
> The difference is the square bracket and this threw the whole thing out of
> whack when it wasn't present.
>
> So now everything is working ok.
>
> --
> View this message in context:
> http://riak-users.197444.n3.nabble.com/Cant-load-data-after-enabling-indexing-on-bucket-with-precommit-hook-tp3686584p3687878.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>



-- 
Sean Cribbs <s...@basho.com>
Software Engineer
Basho Technologies, Inc.
http://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