Created
February 9, 2012 12:45
-
-
Save dayanand-sourcebits/1779785 to your computer and use it in GitHub Desktop.
Riak Secondary Search
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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