Skip to content

Instantly share code, notes, and snippets.

@dayanand-sourcebits
Created February 9, 2012 12:45
Show Gist options
  • Save dayanand-sourcebits/1779785 to your computer and use it in GitHub Desktop.
Save dayanand-sourcebits/1779785 to your computer and use it in GitHub Desktop.
Riak Secondary Search
in your console
client=Ripple.client
client['account_types'].enable_index!
This will enable secondary index for the new entries in "account_types" bucket.
I will add this to the Migrate rake as a new task so things propagate to all the servers. Also i will add it to the setup.rake so that subsequent server setups will have this
-------------------------------------------------------------------------------------------
in your code
client=Ripple.client
query="name:childrenANDcarrier_id:#{carrier_id}"
client.search("account_types",query)
you will get a JSON response. Try it in the console first and you can probably write a method for this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment