-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Shouldn't timestamp be generated when value of path is null ?
Mapping definition:
curl -X PUT http://localhost:9200/twitter/ -d '{
"mappings": {
"_default_": {
"_timestamp" : {
"enabled" : "yes",
"store": "yes",
"path" : "post_date"
},
"properties": {
"message": {
"type": "string"
}
}
}
}
}'Get error when:
curl -X PUT http://127.0.0.1:9200/twitter/tweet/123 -d '{
message: "bam bam"
}'
=> {"error":"ElasticSearchParseException[failed to parse doc to extract routing/timestamp]; nested: TimestampParsingException[failed to parse timestamp [null]]; ","status":400}
curl -X PUT http://127.0.0.1:9200/twitter/tweet/123 -d '{
message: "bam bam",
post_date: "2009-11-15T14:12:12Z"
}'
=> {"ok":true,"_index":"twitter","_type":"tweet","_id":"123","_version":1}