Created
January 16, 2014 14:53
-
-
Save jjmalina/8456218 to your computer and use it in GitHub Desktop.
Installing Yokozuna 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
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