Skip to content

Instantly share code, notes, and snippets.

@l1x
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/9356415 to your computer and use it in GitHub Desktop.
Save l1x/9356415 to your computer and use it in GitHub Desktop.
#creating a new schema
#
curl -XPUT -d @sch_cities.xml -H "Content-Type: application/xml" \
'http://10.0.3.81:10018/search/schema/sch_cities'
curl -XPUT -i "http://10.0.3.81:10018/search/index/idx_cities" \
-H'content-type:application/json' \
-d'{"schema":"sch_cities"}'
#creating a bucket-type - cities using the search index idx_cities
dev1/bin/riak-admin bucket-type create cities '{"props":{"search_index":"idx_cities","n_val":2}}'
dev1/bin/riak-admin bucket-type activate cities
curl -XPUT -d @0005579c-eefd-4754-b556-97f9397222ec.json -H "Content-Type: application/json" \ http://10.0.3.81:10018/types/cities/buckets/cities/keys/0005579c-eefd-4754-b556-97f9397222ec.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment