<p dir="auto">Would like the ability to have meta data per property in the mapping, and have GET mapping return it.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  theytype: {
    properties: {
      field1: {
        type: &quot;long&quot;,
        _meta: {
          info:&quot;field1 info&quot;
        }
      },
      field2: {
        _meta: {
          info:&quot;urls mutli field info&quot;
        },
        type: &quot;multi_field&quot;,
        path: &quot;just_name&quot;,
        omit_norms: true,
        fields: {
          field2: {type: &quot;string&quot;, analyzer: &quot;snowball&quot;},
          rawfield2: {type: &quot;string&quot;, index: &quot;not_analyzed&quot;}
        }
      }
    }
  }
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-c1">theytype</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">properties</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">field1</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">type</span>: <span class="pl-s">"long"</span><span class="pl-kos">,</span>
        <span class="pl-c1">_meta</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">info</span>:<span class="pl-s">"field1 info"</span>
        <span class="pl-kos">}</span>
      <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-c1">field2</span>: <span class="pl-kos">{</span>
        <span class="pl-c1">_meta</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">info</span>:<span class="pl-s">"urls mutli field info"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
        <span class="pl-c1">type</span>: <span class="pl-s">"multi_field"</span><span class="pl-kos">,</span>
        <span class="pl-c1">path</span>: <span class="pl-s">"just_name"</span><span class="pl-kos">,</span>
        <span class="pl-c1">omit_norms</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
        <span class="pl-c1">fields</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">field2</span>: <span class="pl-kos">{</span><span class="pl-c1">type</span>: <span class="pl-s">"string"</span><span class="pl-kos">,</span> <span class="pl-c1">analyzer</span>: <span class="pl-s">"snowball"</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
          <span class="pl-c1">rawfield2</span>: <span class="pl-kos">{</span><span class="pl-c1">type</span>: <span class="pl-s">"string"</span><span class="pl-kos">,</span> <span class="pl-c1">index</span>: <span class="pl-s">"not_analyzed"</span><span class="pl-kos">}</span>
        <span class="pl-kos">}</span>
      <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It looks like I could use fielddata for this too, however seems like a hack, and I wasn't sure if it would hurt performance.  Feature might be useful for folks who want to add comments.</p>
<p dir="auto">A mapping can have a _meta element - but it only keeps it if declared on the top level.<br>
When using the _meta to annotate a mapping, or keeping custom configuration on it, or using it for some binding - a lot of times besides the top level you also need more custom data on a field level. So you need the mapping to keep also _meta nodes defined under fields.</p>