Tuesday, September 4, 2012

Riak Search with Ripple in 3 easy steps

Modify your Riak app.config

By default, Riak Search is disabled. You can enable it in the app.config on each Riak server by changing the value from false to true. The config section should then look something like this:

%% Riak Search Config
 {riak_search, [
                %% To enable Search functionality set this 'true'.
                {enabled, true}

Don't forget to restart Riak afterwards.

Enable the commit hook

From the Rails console you can enable the commit hook for the model you would like to make searchable. Keep in mind anything created prior to doing this will not be searchable. You will need to go back afterwards and essentially touch each of those objects.

Just replace MyObject with class you wish to make searchable.


Ripple.client.search MyObject.bucket.name, "some_field:query"

For additional information, refer to these sites:




  1. Matt, are you able to execute searches in test mode? I have search working in the rails console in development mode, but test mode fails.

    1. Yes, but I ripped out the Test Riak server setup that was there and setup a separate test cluster.

      I actually have some rake tests for generating the config and joining the nodes that I need to share. Look for those soon!

  2. Hey Mat thanks for the link back :)

    1. No problem, thanks for writing up a nice post about Riak Search. It's tough to find good info on it. I'm actually writing a gem to wrap up the search functionality. I already have some good baseline functionality built in. Check it out! Would love to hear your thoughts on it.


    2. That seems awesome, but i no longer use raik, I will definitely check this out when I use riak again. cheers

  3. Top 10 Reasons Why Baccarat Is Better than Three Card Poker
    Learn why baccarat is the best way to bet. 바카라 사이트 The main 샌즈카지노 reason why this game is popular is because of the combination of choegocasino two betting outcomes