<p dir="auto">Hi,<br>
I have a mapping as follows:<br>
<code class="notranslate">"\"task\": { " + "\"properties\": { " + "\"id\" : { \"type\": \"string\", \"index\": \"not_analyzed\" }," + "\"title\": { \"type\": \"string\" }," + "\"description\": { \"type\": \"string\", \"index\": \"not_analyzed\" }," + "\"address\": { \"type\": \"string\" }," + "\"time\": { \"type\": \"long\" }," + "\"location\" : {" + "\"type\" : \"geo_point\", " + "\"lat_lon\" : \"true\", " + "\"normalize\" : \"false\"," + "\"validate\" : \"true\"" + "}"+ " }" + " } " + "}"</code><br>
When I try to update the "time" field with another long value with the following script:<br>
<code class="notranslate">{ "script": "ctx._source.time += time", "params": { "time": 4 } }</code><br>
i get this error:<br>
<code class="notranslate">{ "error" : "MapperParsingException[failed to parse [time]]; nested: NumberFormatException[For input string: "1396457400org.elasticsearch.common.mvel2.util.MethodStub@7f63eccb"]; ", "status" : 400 }</code><br>
Now If i rename "time" to "timex" and recreate the index. my update works fine! why? is "time" a reserved word or something?<br>
Using the JAVA API and just a simple RESTful call give me the same behaviour</p>
<p dir="auto"><strong>Elasticsearch version</strong>:<br>
5.0.0</p>
<p dir="auto"><strong>Plugins installed</strong>:<br>
none</p>
<p dir="auto"><strong>JVM version</strong>:<br>
openjdk version "1.8.0_111"<br>
OpenJDK Runtime Environment (build 1.8.0_111-b15)<br>
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)</p>
<p dir="auto"><strong>OS version</strong>:<br>
Operating System: CentOS Linux 7 (Core)<br>
CPE OS Name: cpe:/o:centos:centos:7<br>
Kernel: Linux 3.10.0-327.el7.x86_64<br>
Architecture: x86-64</p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
When I create a snapshot in any repository, then get all snapshots in the repository. I see two snapshots IN_PROGRESS! Then when the process finishes, I only see one SUCCESSFUL snapshot. The snapshots seem to work correctly, it's just that it shows duplicates while IN_PROGRESS. You can even see below, they have the same uuid: RHlVXKe-TKqB47nAoeh3Sw. Seems like this is probably not intended behavior!</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li>(CREATE) $ curl -XPUT localhost:9200/_snapshot/brokerhistory/test -d'{"indices":"brokerhistory_2016-11-04"}'</li>
</ol>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{&quot;accepted&quot;:true}"><pre class="notranslate">{<span class="pl-ent">"accepted"</span>:<span class="pl-c1">true</span>}</pre></div>
<ol start="2" dir="auto">
<li>(IN_PROGRESS) $ curl -XGET localhost:9200/_snapshot/brokerhistory/_all?pretty</li>
</ol>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;snapshots&quot; : [
    {
      &quot;snapshot&quot; : &quot;test&quot;,
      &quot;uuid&quot; : &quot;RHlVXKe-TKqB47nAoeh3Sw&quot;,
      &quot;version_id&quot; : 5000099,
      &quot;version&quot; : &quot;5.0.0&quot;,
      &quot;indices&quot; : [
        &quot;brokerhistory_2016-11-04&quot;
      ],
      &quot;state&quot; : &quot;IN_PROGRESS&quot;,
      &quot;start_time&quot; : &quot;2016-11-04T13:24:42.755Z&quot;,
      &quot;start_time_in_millis&quot; : 1478265882755,
      &quot;failures&quot; : [ ],
      &quot;shards&quot; : {
        &quot;total&quot; : 0,
        &quot;failed&quot; : 0,
        &quot;successful&quot; : 0
      }
    },
    {
      &quot;snapshot&quot; : &quot;test&quot;,
      &quot;uuid&quot; : &quot;RHlVXKe-TKqB47nAoeh3Sw&quot;,
      &quot;version_id&quot; : 5000099,
      &quot;version&quot; : &quot;5.0.0&quot;,
      &quot;indices&quot; : [
        &quot;brokerhistory_2016-11-04&quot;
      ],
      &quot;state&quot; : &quot;IN_PROGRESS&quot;,
      &quot;start_time&quot; : &quot;2016-11-04T13:24:42.755Z&quot;,
      &quot;start_time_in_millis&quot; : 1478265882755,
      &quot;failures&quot; : [ ],
      &quot;shards&quot; : {
        &quot;total&quot; : 0,
        &quot;failed&quot; : 0,
        &quot;successful&quot; : 0
      }
    }
  ]
}"><pre class="notranslate">{
  <span class="pl-ent">"snapshots"</span> : [
    {
      <span class="pl-ent">"snapshot"</span> : <span class="pl-s"><span class="pl-pds">"</span>test<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"uuid"</span> : <span class="pl-s"><span class="pl-pds">"</span>RHlVXKe-TKqB47nAoeh3Sw<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"version_id"</span> : <span class="pl-c1">5000099</span>,
      <span class="pl-ent">"version"</span> : <span class="pl-s"><span class="pl-pds">"</span>5.0.0<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"indices"</span> : [
        <span class="pl-s"><span class="pl-pds">"</span>brokerhistory_2016-11-04<span class="pl-pds">"</span></span>
      ],
      <span class="pl-ent">"state"</span> : <span class="pl-s"><span class="pl-pds">"</span>IN_PROGRESS<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time"</span> : <span class="pl-s"><span class="pl-pds">"</span>2016-11-04T13:24:42.755Z<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time_in_millis"</span> : <span class="pl-c1">1478265882755</span>,
      <span class="pl-ent">"failures"</span> : [ ],
      <span class="pl-ent">"shards"</span> : {
        <span class="pl-ent">"total"</span> : <span class="pl-c1">0</span>,
        <span class="pl-ent">"failed"</span> : <span class="pl-c1">0</span>,
        <span class="pl-ent">"successful"</span> : <span class="pl-c1">0</span>
      }
    },
    {
      <span class="pl-ent">"snapshot"</span> : <span class="pl-s"><span class="pl-pds">"</span>test<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"uuid"</span> : <span class="pl-s"><span class="pl-pds">"</span>RHlVXKe-TKqB47nAoeh3Sw<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"version_id"</span> : <span class="pl-c1">5000099</span>,
      <span class="pl-ent">"version"</span> : <span class="pl-s"><span class="pl-pds">"</span>5.0.0<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"indices"</span> : [
        <span class="pl-s"><span class="pl-pds">"</span>brokerhistory_2016-11-04<span class="pl-pds">"</span></span>
      ],
      <span class="pl-ent">"state"</span> : <span class="pl-s"><span class="pl-pds">"</span>IN_PROGRESS<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time"</span> : <span class="pl-s"><span class="pl-pds">"</span>2016-11-04T13:24:42.755Z<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time_in_millis"</span> : <span class="pl-c1">1478265882755</span>,
      <span class="pl-ent">"failures"</span> : [ ],
      <span class="pl-ent">"shards"</span> : {
        <span class="pl-ent">"total"</span> : <span class="pl-c1">0</span>,
        <span class="pl-ent">"failed"</span> : <span class="pl-c1">0</span>,
        <span class="pl-ent">"successful"</span> : <span class="pl-c1">0</span>
      }
    }
  ]
}</pre></div>
<ol start="3" dir="auto">
<li>(SUCCESS) $ curl -XGET localhost:9200/_snapshot/brokerhistory/_all?pretty</li>
</ol>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;snapshots&quot; : [
    {
      &quot;snapshot&quot; : &quot;test&quot;,
      &quot;uuid&quot; : &quot;RHlVXKe-TKqB47nAoeh3Sw&quot;,
      &quot;version_id&quot; : 5000099,
      &quot;version&quot; : &quot;5.0.0&quot;,
      &quot;indices&quot; : [
        &quot;brokerhistory_2016-11-04&quot;
      ],
      &quot;state&quot; : &quot;SUCCESS&quot;,
      &quot;start_time&quot; : &quot;2016-11-04T13:24:42.755Z&quot;,
      &quot;start_time_in_millis&quot; : 1478265882755,
      &quot;end_time&quot; : &quot;2016-11-04T13:25:31.027Z&quot;,
      &quot;end_time_in_millis&quot; : 1478265931027,
      &quot;duration_in_millis&quot; : 48272,
      &quot;failures&quot; : [ ],
      &quot;shards&quot; : {
        &quot;total&quot; : 1,
        &quot;failed&quot; : 0,
        &quot;successful&quot; : 1
      }
    }
  ]
}"><pre class="notranslate">{
  <span class="pl-ent">"snapshots"</span> : [
    {
      <span class="pl-ent">"snapshot"</span> : <span class="pl-s"><span class="pl-pds">"</span>test<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"uuid"</span> : <span class="pl-s"><span class="pl-pds">"</span>RHlVXKe-TKqB47nAoeh3Sw<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"version_id"</span> : <span class="pl-c1">5000099</span>,
      <span class="pl-ent">"version"</span> : <span class="pl-s"><span class="pl-pds">"</span>5.0.0<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"indices"</span> : [
        <span class="pl-s"><span class="pl-pds">"</span>brokerhistory_2016-11-04<span class="pl-pds">"</span></span>
      ],
      <span class="pl-ent">"state"</span> : <span class="pl-s"><span class="pl-pds">"</span>SUCCESS<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time"</span> : <span class="pl-s"><span class="pl-pds">"</span>2016-11-04T13:24:42.755Z<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"start_time_in_millis"</span> : <span class="pl-c1">1478265882755</span>,
      <span class="pl-ent">"end_time"</span> : <span class="pl-s"><span class="pl-pds">"</span>2016-11-04T13:25:31.027Z<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"end_time_in_millis"</span> : <span class="pl-c1">1478265931027</span>,
      <span class="pl-ent">"duration_in_millis"</span> : <span class="pl-c1">48272</span>,
      <span class="pl-ent">"failures"</span> : [ ],
      <span class="pl-ent">"shards"</span> : {
        <span class="pl-ent">"total"</span> : <span class="pl-c1">1</span>,
        <span class="pl-ent">"failed"</span> : <span class="pl-c1">0</span>,
        <span class="pl-ent">"successful"</span> : <span class="pl-c1">1</span>
      }
    }
  ]
}</pre></div>