Skip to content

Instantly share code, notes, and snippets.

@lukas-vlcek
Created March 2, 2011 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lukas-vlcek/850956 to your computer and use it in GitHub Desktop.
Save lukas-vlcek/850956 to your computer and use it in GitHub Desktop.
curl -XPUT ${host}/_template/template_mail -d '
{
"template" : "*",
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 1
},
"mappings" : {
"mail" : {
"_index" : { "enabled" : true },
"properties" : {
"document_url" : { "type" : "string", "store" : "yes", "index" : "not_analyzed", "null_value" : "#na", "include_in_all" : "false" },
"project" : { "type" : "string", "store" : "no", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"mail-list" : { "type" : "string", "store" : "no", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"message-id" : { "type" : "string", "store" : "yes", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"message-id-original" : { "type" : "string", "store" : "yes", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"in-reply-to" : { "type" : "string", "store" : "yes", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"references" : { "type" : "string", "store" : "yes", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false" },
"subject" : { "boost" : "3.0", "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball" },
"message-snippet" : { "type" : "string", "store" : "yes", "index" : "no", "include_in_all" : "false" },
"first-text-message" : { "boost" : "2.0", "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball" },
"first-html-message" : { "boost" : "2.0", "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball_html_strip" },
"text-messages" : { "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball" },
"html-messages" : { "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball_html_strip" },
"text-messages-cnt" : { "type" : "integer", "include_in_all" : "false" },
"html-messages-cnt" : { "type" : "integer", "include_in_all" : "false" },
"message-attachments" : {
"type" : "attachment",
"fields" : {
"message-attachments" : { "store" : "yes", "analyzer" : "snowball" }
}
},
"message-attachments-cnt" : { "type" : "integer", "include_in_all" : "false" },
"date" : { "type" : "date", "store" : "yes" },
"from" : {
"type" : "multi_field",
"fields" : {
"from" : { "boost" : "1.5", "type" : "string" },
"not_analyzed" : { "type" : "string", "index" : "not_analyzed", "store" : "yes" }
}
}
},
"_all" : { "analyzer" : "snowball_html_strip" }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment