OpenSearch/docs
David Pilato 85eb0ea0e7 Generate timestamp when path is null
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.
2014-07-31 19:48:22 +02:00
..
community [Docs] Add link to .NET client docs 2014-07-28 23:48:29 -04:00
groovy-api Updated groovy docs to point to the new groovy repo 2014-05-14 12:08:02 +02:00
java-api [DOCS][FIX] Fix doc parsing, broken closing block 2014-07-16 11:18:21 +01:00
javascript added doc page for the JavaScipt client, and listed it in the clients list. 2013-12-17 15:26:29 -07:00
perl [DOCS] Updated the Perl docs 2014-03-09 19:45:16 +01:00
python [DOCS] adding a note on python client versioning schema 2014-02-11 03:43:53 +01:00
reference Generate timestamp when path is null 2014-07-31 19:48:22 +02:00
river [DOCS] Fixed typo 2013-10-05 17:10:30 +02:00
ruby [DOC] Added comprehensive documentation for the Ruby and Rails integrations 2014-07-10 11:21:27 +02:00
README.md [DOCS] various docs fixes 2014-01-23 10:52:13 +01:00

README.md

The Elasticsearch docs are in AsciiDoc format and can be built using the Elasticsearch documentation build process

See: https://github.com/elasticsearch/docs