Skip to content

Instantly share code, notes, and snippets.

@zhoutuo
Last active December 19, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zhoutuo/5930288 to your computer and use it in GitHub Desktop.
Save zhoutuo/5930288 to your computer and use it in GitHub Desktop.
{
"template": "sfly-preprod-checksum-*",
"settings" : {
"number_of_shards" : 5,
"number_of_replicas" : 1
},
"mappings": {
"_default_": {
"_all": { "enabled": false },
"_source": { "includes": ["@signature"] },
"_ttl": { "enabled": true, "default": "4w" },
"_id": { "path": "@checksum" },
"properties" : {
"@signature" : {"type" : "string", "index" : "not_analyzed" },
"@checksum" : {"type" : "string", "index" : "not_analyzed" }
}
}
}
}
curl -XPUT 'http://localhost:9200/_template/template_checksum/' -d @checksum_template.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment