Skip to content

Instantly share code, notes, and snippets.

@jjmalina
Created January 16, 2014 14:53
Show Gist options
  • Save jjmalina/8456218 to your computer and use it in GitHub Desktop.
Save jjmalina/8456218 to your computer and use it in GitHub Desktop.
Installing Yokozuna search
RIAK_ADMIN=${RIAK_ADMIN:-riak-admin}
echo Bucket type is ${TYPE:=events}
echo Index is ${INDEX:=$TYPE}
echo Schema name ${SCHEMA:=$INDEX}
echo Schema from ${SCHEMA_SOURCE:=${SCHEMA}_schema.xml}
curl -X PUT -i "http://localhost:8098/search/schema/$SCHEMA" -H "content-type:application/xml" -d @$SCHEMA_SOURCE
curl -X PUT -i "http://localhost:8098/search/index/$INDEX" -H "content-type:application/json" -d "{\"schema\":\"$SCHEMA\"}"
$RIAK_ADMIN bucket-type create $TYPE "{\"props\":{\"n_val\":1,\"last_write_wins\":true,\"search_index\":\"$INDEX\"}}"
$RIAK_ADMIN bucket-type activate $TYPE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment