Skip to content

Instantly share code, notes, and snippets.

@Vineeth-Mohan
Created August 8, 2012 08:34
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/3293443 to your computer and use it in GitHub Desktop.
Save Vineeth-Mohan/3293443 to your computer and use it in GitHub Desktop.
curl -X DELETE "http://$hostname:9200/algotree"
echo
curl -X PUT "http://$hostname:9200/algotree" -d '{ "settings" : { "index" : { "number_of_shards" : 2, "number_of_replicas" : 1 ,
"analysis":{
"analyzer":{
"standard" : {
"type" : "snowball"
},
"content" : {
"type" : "custom",
"tokenizer" : "standard",
"filter" : ["lowercase" , "stop" , "mySnow"],
"char_filter" : ["html_strip"]
}
},
"filter":{
"mySnow" : {
"type" : "snowball",
"language" : "English"
}
}
}}}}'
echo
curl -X PUT "http://$hostname:9200/algotree/news/_mapping" -d '{
"public" :{
"properties" :{
"Content" : { "type" : "string" , "store" : "yes","Analyzer":"content" },
"ParentUrl" : { "type" : "string" , "store" : "yes" }
}
}
}'
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment