small medium large xlarge

My_big_head-small_pragsmall
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?

Ryan

My_big_head-small_pragsmall
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.

Generic-user-small
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 (http://issues.basho.com/show_bug.cgi?id=1216) 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.

Vsa-mangatar_pragsmall
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 (http://lists.basho.com/pipermail/riak-users_lists.basho.com/2012-July/008964.html) 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@

Vic

You must be logged in to comment