Advertisement
Guest User

Untitled

a guest
May 27th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.09 KB | None | 0 0
  1. def putMapping():
  2.     es.indices.put_mapping(                                                
  3.         index=INDEX_NAME,
  4.         doc_type='enron-type',
  5.         body=
  6.         {
  7.             "dynamic": "strict",                                           
  8.             "_source": {"enabled": "false"},  
  9.             "properties":
  10.                 {
  11.                     "content-transfer-encoding": {"type": "string", "store": "false"},
  12.                     "message_body": {"type": "string", "analyzer": "english", "store": "false"},
  13.                     "content-type": {"type": "string", "store": "false"},
  14.                     "x-bcc": {"type": "string", "store": "false"},
  15.                     "from": {"type": "string", "store": "false"},
  16.                     "x-from": {"type": "string", "store": "false"},
  17.                     "x-filename": {"type": "string", "store": "false"},
  18.                     "x-folder": {"type": "string", "store": "false"},
  19.                     "to": {"type": "string", "store": "true"},
  20.                     "x-to": {"type": "string", "store": "false"},
  21.                     "mime-version": {"type": "string", "store": "false"},
  22.                     "file_name": {"type": "string", "store": "false"},
  23.                     "cc": {"type": "string", "store": "false"},
  24.                     "x-cc": {"type": "string", "store": "false"},
  25.                     "bcc": {"type": "string", "store": "false"},
  26.                     "x-bcc": {"type": "string", "store": "false"},
  27.                     "subject": {"type": "string", "store": "false"},
  28.                     "message-id": {"type": "string", "store": "true"},
  29.                     "x-origin": {"type": "string", "store": "false"},
  30.                     "sub_holder": {"type": "string", "store": "false"},
  31.                     "date": {"type": "date", "format": "EEE, dd MMM yyyy HH:mm:ss Z (z)"},
  32.                     "attendees": {"type": "string", "store": "false"},
  33.                     "loaded_on": {"type": "date", "store": "false", "format": "dateOptionalTime"},
  34.                     "content_size_in_bytes": {"type": "long", "store": "true"}
  35.  
  36.                 }
  37.         }
  38.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement