<p dir="auto"><strong>Elasticsearch version</strong>: 5.0.0-alpha5</p>
<p dir="auto"><strong>Plugins installed</strong>: []</p>
<p dir="auto"><strong>JVM version</strong>:</p>
<p dir="auto"><strong>OS version</strong>:</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p>
<p dir="auto">Considering the following request/response:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -XPUT &quot;http://localhost:9200/test&quot; -d'
{
  &quot;settings&quot;: {
    &quot;number_of_shards&quot;: 4,
    &quot;number_of_shards&quot;: 1
  }
}'"><pre class="notranslate"><code class="notranslate">curl -XPUT "http://localhost:9200/test" -d'
{
  "settings": {
    "number_of_shards": 4,
    "number_of_shards": 1
  }
}'
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl &quot;http://localhost:9200/test?pretty&quot;
{
  &quot;test&quot; : {
    &quot;aliases&quot; : { },
    &quot;mappings&quot; : { },
    &quot;settings&quot; : {
      &quot;index&quot; : {
        &quot;creation_date&quot; : &quot;1472515277804&quot;,
        &quot;number_of_shards&quot; : &quot;1&quot;,
        &quot;number_of_replicas&quot; : &quot;1&quot;,
        &quot;uuid&quot; : &quot;mXl843bTQzyYl1ImeTqKaQ&quot;,
        &quot;version&quot; : {
          &quot;created&quot; : &quot;5000005&quot;
        }
      }
    }
  }
}"><pre class="notranslate"><code class="notranslate">curl "http://localhost:9200/test?pretty"
{
  "test" : {
    "aliases" : { },
    "mappings" : { },
    "settings" : {
      "index" : {
        "creation_date" : "1472515277804",
        "number_of_shards" : "1",
        "number_of_replicas" : "1",
        "uuid" : "mXl843bTQzyYl1ImeTqKaQ",
        "version" : {
          "created" : "5000005"
        }
      }
    }
  }
}
</code></pre></div>
<p dir="auto">Elasticsearch accepts the request and Elasticsearch accepts the request with a "last one wins" rule.</p>
<p dir="auto">If this command is placed in Kibana Console, then it shows as an error. For example:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/129643/18109074/4244db3c-6ec4-11e6-97a1-2aef153ac97a.png"><img width="341" alt="screen shot 2016-08-30 at 11 35 13 am" src="https://cloud.githubusercontent.com/assets/129643/18109074/4244db3c-6ec4-11e6-97a1-2aef153ac97a.png" style="max-width: 100%;"></a></p>
<p dir="auto">The JSON RFC says "The names within an object SHOULD be unique". Should Elasticsearch reject a request like this? Or should Sense be adjusted to not show this as an error?</p>
<p dir="auto"><code class="notranslate">org.elasticsearch.search.aggregations.metrics.max.Max</code> has both a <code class="notranslate">value</code> and a <code class="notranslate">geValue()</code> methods. It should only have one of them. Other single-metric aggs seem to be impacted as well.</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/colings86/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/colings86">@colings86</a></p>