Advertisement
Guest User

Elasticsearch Index Template - Proper Typing

a guest
Jul 15th, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 4.23 KB | None | 0 0
  1. {
  2.   "test-template": {
  3.     "order": 1,
  4.     "template": "logstash-*",
  5.     "mappings": {
  6.       "_default_": {
  7.         "dynamic_templates": [
  8.           {
  9.             "boolean_fields": {
  10.               "mapping": {
  11.                 "index": "not_analyzed",
  12.                 "omit_norms": true,
  13.                 "doc_values": true,
  14.                 "type": "boolean"
  15.               },
  16.               "match": "*_boolean"
  17.             }
  18.           },
  19.           {
  20.             "integer_fields": {
  21.               "mapping": {
  22.                 "index": "not_analyzed",
  23.                 "omit_norms": true,
  24.                 "doc_values": true,
  25.                 "type": "integer"
  26.               },
  27.               "match": "*_integer"
  28.             }
  29.           },
  30.           {
  31.             "long_fields": {
  32.               "mapping": {
  33.                 "index": "not_analyzed",
  34.                 "omit_norms": true,
  35.                 "doc_values": true,
  36.                 "type": "long"
  37.               },
  38.               "match": "*_long"
  39.             }
  40.           },
  41.           {
  42.             "float_fields": {
  43.               "mapping": {
  44.                 "index": "not_analyzed",
  45.                 "omit_norms": true,
  46.                 "doc_values": true,
  47.                 "type": "float"
  48.               },
  49.               "match": "*_float"
  50.             }
  51.           },
  52.           {
  53.             "double_fields": {
  54.               "mapping": {
  55.                 "index": "not_analyzed",
  56.                 "omit_norms": true,
  57.                 "doc_values": true,
  58.                 "type": "double"
  59.               },
  60.               "match": "*_double"
  61.             }
  62.           },
  63.           {
  64.             "ip_fields": {
  65.               "mapping": {
  66.                 "index": "not_analyzed",
  67.                 "omit_norms": true,
  68.                 "doc_values": true,
  69.                 "type": "ip"
  70.               },
  71.               "match": "*_ip"
  72.             }
  73.           },
  74.           {
  75.             "geo_point_fields": {
  76.               "mapping": {
  77.                 "index": "not_analyzed",
  78.                 "omit_norms": true,
  79.                 "doc_values": true,
  80.                 "type": "geo_point"
  81.               },
  82.               "match": "*_geo_point"
  83.             }
  84.           },
  85.           {
  86.             "date_fields": {
  87.               "mapping": {
  88.                 "index": "not_analyzed",
  89.                 "omit_norms": true,
  90.                 "doc_values": true,
  91.                 "type": "date"
  92.               },
  93.               "match": "*__date"
  94.             }
  95.           },
  96.           {
  97.             "string_fields": {
  98.               "mapping": {
  99.                 "index": "not_analyzed",
  100.                 "omit_norms": true,
  101.                 "doc_values": true,
  102.                 "type": "string"
  103.               },
  104.               "match": "*_string"
  105.             }
  106.           },
  107.           {
  108.             "nested_items_template": {
  109.               "mapping": {
  110.                 "date_detection": false,
  111.                 "fields": {
  112.                   "{name}": {
  113.                     "index": "analyzed",
  114.                     "type": "object"
  115.                   }
  116.                 }
  117.               },
  118.               "match_mapping_type": "object",
  119.               "match": "*"
  120.             }
  121.           },
  122.           {
  123.             "string_fields": {
  124.               "mapping": {
  125.                 "index": "analyzed",
  126.                 "omit_norms": true,
  127.                 "date_detection": false,
  128.                 "type": "string",
  129.                 "fields": {
  130.                   "raw": {
  131.                     "index": "not_analyzed",
  132.                     "ignore_above": 256,
  133.                     "doc_values": true,
  134.                     "type": "string"
  135.                   }
  136.                 }
  137.               },
  138.               "match": "*"
  139.             }
  140.           }
  141.         ],
  142.         "numeric_detection": false,
  143.         "date_detection": false,
  144.         "properties": {
  145.           "@timestamp": {
  146.             "type": "date"
  147.           },
  148.           "geoip": {
  149.             "properties": {
  150.               "coordinates": {
  151.                 "type": "geo_point"
  152.               },
  153.               "ip": {
  154.                 "type": "ip"
  155.               }
  156.             }
  157.           }
  158.         }
  159.       }
  160.     },
  161.     "aliases": {}
  162.   }
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement