title: Elasticsearch - dynamic mapping with multi-field support
body: <p>Is it possible to add new fields with <em>multi-field</em> support dynamically?</p>
  
  <p>My index has properties that will only be known at indexing time. So these fields will be included with dynamic mapping.</p>
  
  <p>But, when a new field is added dynamically, I need it to be mapped as <code>text</code> and with three sub-fields: <code>keyword</code>, <code>date</code> (if it fits with <code>dynamic_date_formats</code>) and <code>long</code>.</p>
  
  <p>With these three sub-fields I will be able to search and aggregate many queries with maximum performance.</p>
  
  <p>I know I can do a "pre" mapping my index with these "dynamic fields" using <code>nested</code> field with <code>key</code> and <code>value</code> properties so I can create the value property with these three sub-fields. But I don't want to create a nested key/value field because it's not very fast when performing aggregations with a lot of documents.</p>