mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 18:03:32 -04:00
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. |
||
---|---|---|
.. | ||
analysis | ||
cat | ||
cluster | ||
docs | ||
images | ||
index-modules | ||
indices | ||
mapping | ||
migration | ||
modules | ||
query-dsl | ||
search | ||
setup | ||
testing | ||
analysis.asciidoc | ||
api-conventions.asciidoc | ||
cat.asciidoc | ||
cluster.asciidoc | ||
docs.asciidoc | ||
getting-started.asciidoc | ||
glossary.asciidoc | ||
index-modules.asciidoc | ||
index.asciidoc | ||
indices.asciidoc | ||
mapping.asciidoc | ||
modules.asciidoc | ||
query-dsl.asciidoc | ||
search.asciidoc | ||
setup.asciidoc | ||
testing.asciidoc |