Skip to content

Instantly share code, notes, and snippets.

@karmi
Forked from lukas-vlcek/gist:850956
Created May 15, 2011 14:13
Show Gist options
  • Save karmi/973190 to your computer and use it in GitHub Desktop.
Save karmi/973190 to your computer and use it in GitHub Desktop.

Revisions

  1. @lukas-vlcek lukas-vlcek revised this gist Mar 2, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -11,8 +11,8 @@ curl -XPUT ${host}/_template/template_mail -d '
    "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" },
    "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" },
  2. @lukas-vlcek lukas-vlcek created this gist Mar 2, 2011.
    55 changes: 55 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    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" : { "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" }
    }
    }
    }