85eb0ea0e7
Index process fails when having `_timestamp` enabled and `path` option is set. It fails with a `TimestampParsingException[failed to parse timestamp [null]]` message. Reproduction: ``` DELETE test PUT test { "mappings": { "test": { "_timestamp" : { "enabled" : "yes", "path" : "post_date" } } } } PUT test/test/1 { "foo": "bar" } ``` You can define a default value for when timestamp is not provided within the index request or in the `_source` document. By default, the default value is `now` which means the date the document was processed by the indexing chain. You can disable that default value by setting `default` to `null`. It means that `timestamp` is mandatory: ``` { "tweet" : { "_timestamp" : { "enabled" : true, "default" : null } } } ``` If you don't provide any timestamp value, indexation will fail. You can also set the default value to any date respecting timestamp format: ``` { "tweet" : { "_timestamp" : { "enabled" : true, "format" : "YYYY-MM-dd", "default" : "1970-01-01" } } } ``` If you don't provide any timestamp value, indexation will fail. Closes #4718. Closes #7036. |
||
---|---|---|
.. | ||
all-field.asciidoc | ||
analyzer-field.asciidoc | ||
boost-field.asciidoc | ||
field-names-field.asciidoc | ||
id-field.asciidoc | ||
index-field.asciidoc | ||
parent-field.asciidoc | ||
routing-field.asciidoc | ||
size-field.asciidoc | ||
source-field.asciidoc | ||
timestamp-field.asciidoc | ||
ttl-field.asciidoc | ||
type-field.asciidoc | ||
uid-field.asciidoc |