Last active
August 29, 2015 14:02
Revisions
-
adkatrit revised this gist
Aug 26, 2015 . 1 changed file with 30 additions and 43 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,68 +1,55 @@ #!/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 ""; -
adkatrit created this gist
Jun 20, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,68 @@ if [[ -z "$1" ]]; then $INDEX = $1 else exit 1 fi #Create index curl -XPUT "localhost:55559/$INDEX/" #Close index curl -XPOST "localhost:55559/$INDEX/_close" #refresh rate curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ "index" : { "refresh_interval" :-1 } }' #merge policy curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ "index" : { "index.merge.policy.merge_factor" : 30 } }' #replicas curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ "index" : { "number_of_replicas" : 0 } }' #flush -- only necessary for bulk loading #curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ #"index":{ #"index.translog.flush_threshold_size":10000 #} #}' #buffer curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ "index":{ "indices.memory.index_buffer_size": 30 } }' #create the index curl -XPUT "localhost:55559/$INDEX/_settings" -d '{ "mappings":{ "raw_data":{ "properties":{ "datapath":{ "type":"string", "index":"not_analyzed" }, "location":{ "type":"geo-point", "geohash":true } } } } }' curl -XPOST "localhost:55559/$INDEX/_open"