Skip to content

Instantly share code, notes, and snippets.

@adkatrit
Last active August 29, 2015 14:02
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 adkatrit/0f94769031d17af1aabd to your computer and use it in GitHub Desktop.
Save adkatrit/0f94769031d17af1aabd to your computer and use it in GitHub Desktop.
#!/bin/bash
INDEX="corp-reg"
ES_SOCKET="10.0.1.109:9200"
#Create index
curl -XPUT "$ES_SOCKET/$INDEX/"
#replicas
curl -XPUT "$ES_SOCKET/$INDEX/_settings" -d '{
"index" : {
"number_of_replicas" : 0
}
}'
echo "";
#Close index
curl -XPOST "$ES_SOCKET/$INDEX/_close"
echo "";
#refresh rate
curl -XPUT "$ES_SOCKET/$INDEX/_settings" -d '{
"index" : {
"refresh_interval" :-1
}
}'
echo "";
#merge policy
curl -XPUT "$ES_SOCKET/$INDEX/_settings" -d '{
"index" : {
"index.merge.policy.merge_factor" : 30
}
}'
echo "";
#flush -- only necessary for bulk loading
curl -XPUT "$ES_SOCKET/$INDEX/_settings" -d '{
"index":{
"index.translog.flush_threshold_size":10000
}
}'
echo "";
#buffer
curl -XPUT "$ES_SOCKET/$INDEX/_settings" -d '{
"index":{
"indices.memory.index_buffer_size": 30
}
}'
echo "";
curl -XPOST "$ES_SOCKET/$INDEX/_open"
echo "";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment