Skip to content

Instantly share code, notes, and snippets.

@Vineeth-Mohan
Created March 9, 2012 09:21
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 Vineeth-Mohan/2005810 to your computer and use it in GitHub Desktop.
Save Vineeth-Mohan/2005810 to your computer and use it in GitHub Desktop.
algotree@alpha:~/elasticSearch$ cat edgar.sh
#!/bin/bash
curl -X DELETE "localhost:9200/algotree"
echo
curl -X PUT "localhost:9200/algotree" -d '{ "settings" : { "index" : { "number_of_shards" : 2, "number_of_replicas" : 1 },
"analysis" : {"analyzer" : {"my_analyzer" : {"type" : "snowball","language" : "English" }}},
"filter" : { "my_snow" : {"type" : "snowball","language" : "English"}}
}}'
echo
curl -X PUT "localhost:9200/algotree/attachment/_mapping" -d '{
"filing" :{
"_source" : { "enabled" : true , "compress" : true },
"_all" : {"enabled" : false},
"properties" :{}
}
}'
echo
curl -X PUT "localhost:9200/algotree/attachment/_mapping" -d '{
"attachment" :{
"_source" : { "enabled" : true , "compress" : true },
"_all" : {"enabled" : false},
"_parent" : { "type" : "filing"},
"properties" :{}
}
}'
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment