Riak Http API Commands to create search index and assign to a bucket

Riak Http port number is 8098 and the below are the commands to create the search index and assign it it a bucket. I use Curl to run it

Bucket Name: bucket
Search index Name: bucketIndex

Create the search index: 
curl -XPUT http://localhost:8098/search/index/bucketIndex

Assign the search index to a bucket: 
curl -XPUT http://localhost:8098/buckets/bucket/props -H ‘Content-Type:application/json’ -d ‘{“props”:{“search_index”:”bucketIndex”}}’

Check the bucket properties: 
curl http://localhost:8098/types/default/buckets/bucket/props


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s