Issue 1:
Hi,

I have a mapping as follows:

"\"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\"" + "}"+ " }" + " } " + "}"

When I try to update the "time" field with another long value with the following script:

{ "script": "ctx._source.time += time", "params": { "time": 4 } }

i get this error:

{ "error" : "MapperParsingException[failed to parse [time]]; nested: NumberFormatException[For input string: "1396457400org.elasticsearch.common.mvel2.util.MethodStub@7f63eccb"]; ", "status" : 400 }

Now If i rename "time" to "timex" and recreate the index. my update works fine! why? is "time" a reserved word or something?

Using the JAVA API and just a simple RESTful call give me the same behaviour

Issue 2:
Elasticsearch version:

5.0.0

Plugins installed:

none

JVM version:

openjdk version "1.8.0_111"

OpenJDK Runtime Environment (build 1.8.0_111-b15)

OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)

OS version:

Operating System: CentOS Linux 7 (Core)

CPE OS Name: cpe:/o:centos:centos:7

Kernel: Linux 3.10.0-327.el7.x86_64

Architecture: x86-64

Description of the problem including expected versus actual behavior:

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!

Steps to reproduce:

(CREATE) $ curl -XPUT localhost:9200/_snapshot/brokerhistory/test -d'{"indices":"brokerhistory_2016-11-04"}'

{"accepted":true}

(IN_PROGRESS) $ curl -XGET localhost:9200/_snapshot/brokerhistory/_all?pretty

{
"snapshots" : [
{
"snapshot" : "test",
"uuid" : "RHlVXKe-TKqB47nAoeh3Sw",
"version_id" : 5000099,
"version" : "5.0.0",
"indices" : [
"brokerhistory_2016-11-04"
],
"state" : "IN_PROGRESS",
"start_time" : "2016-11-04T13:24:42.755Z",
"start_time_in_millis" : 1478265882755,
"failures" : [ ],
"shards" : {
"total" : 0,
"failed" : 0,
"successful" : 0
}
},
{
"snapshot" : "test",
"uuid" : "RHlVXKe-TKqB47nAoeh3Sw",
"version_id" : 5000099,
"version" : "5.0.0",
"indices" : [
"brokerhistory_2016-11-04"
],
"state" : "IN_PROGRESS",
"start_time" : "2016-11-04T13:24:42.755Z",
"start_time_in_millis" : 1478265882755,
"failures" : [ ],
"shards" : {
"total" : 0,
"failed" : 0,
"successful" : 0
}
}
]
}

(SUCCESS) $ curl -XGET localhost:9200/_snapshot/brokerhistory/_all?pretty

{
"snapshots" : [
{
"snapshot" : "test",
"uuid" : "RHlVXKe-TKqB47nAoeh3Sw",
"version_id" : 5000099,
"version" : "5.0.0",
"indices" : [
"brokerhistory_2016-11-04"
],
"state" : "SUCCESS",
"start_time" : "2016-11-04T13:24:42.755Z",
"start_time_in_millis" : 1478265882755,
"end_time" : "2016-11-04T13:25:31.027Z",
"end_time_in_millis" : 1478265931027,
"duration_in_millis" : 48272,
"failures" : [ ],
"shards" : {
"total" : 1,
"failed" : 0,
"successful" : 1
}
}
]
}