small medium large xlarge

19 Mar 2012, 14:41
Ryan C. Payne (5 posts)

Has anybody been able to get the risk search hook to work? I have been trying to get the hook configured and it’s not working for me?

I have verified that I am typing the right PUT request… even copied it out of the PDF and pasted it in. It doesn’t error out or anything. However, when I look at the params of the bucket, the precommit hook is showing an empty array.

Am I missing something?


19 Mar 2012, 14:52
Ryan C. Payne (5 posts)

OK… Well… That’s interesting… I visited the Basho wiki page and they show the exact same command that I’m using and it doesn’t work…

But, they also show that you can run this from the command line:

bin/search-cmd install my_bucket_name

And doing that… worked… So… I guess the text in the book is correct but for some reason my riak is angry or something.

17 Jul 2012, 23:28
Mick Brooks (6 posts)

My Riak is angry too - I have the same problem. However, doing the curl PUT onto a new bucket (which is suggested in the text, though the example reuses the animals bucket) worked.

A search dug up a bug ( which suggests that setting the search property to true will do the trick. Sure enough:

curl -i -X PUT http://localhost:8091/riak/animals -H "Content-Type: application/json" -d '{"props" {"search":true}}'

seemed to install the search hook on my existing animals bucket, too.

I’m not sure how to explain what’s happening here, but thought I’d add another couple of data points.

04 Aug 2012, 16:51
Vichheann Saing (1 post)

Thanks guys, I’ve got the same trouble!

I’ve set the @search@ property to @true@ using the REST API and it was fine.

Also, the query with multiple parameters does not work as expected. I found this post ( useful.

So this query @http://localhost:8091/solr/animals/select?wt=json&q=nickname:Rin%20AND%20breed:Shepher@ works for me.

And for secondary indexes queries, I have to use this @http://localhost:8091/buckets/animals/index/mascot_bin/butler@


You must be logged in to comment