Skip to content

Instantly share code, notes, and snippets.

@lukas-vlcek
Created June 7, 2011 08:45
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lukas-vlcek/1011913 to your computer and use it in GitHub Desktop.
Save lukas-vlcek/1011913 to your computer and use it in GitHub Desktop.
Mapping template for mail type #bbuzz 2011
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", "omit_norms" : "true", "omit_term_freq_and_positions" : "true" },
"mail_list" : { "type" : "string", "store" : "no", "index" : "not_analyzed", "null_value" : "na", "include_in_all" : "false", "omit_norms" : "true", "omit_term_freq_and_positions" : "true" },
"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_original" : { "type" : "string", "store" : "yes", "term_vector" : "with_positions_offsets", "analyzer" : "snowball", "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" },
"author" : {
"type" : "multi_field",
"fields" : {
"author" : { "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