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
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com