OpenSearch/docs/reference/mapping/fields
David Pilato fb10346953 [Mapper] Add `ignore_missing` option to `timestamp`
Related to #9049.

By default, the default value for `timestamp` is `now` which means the date the document was processed by the indexing chain.

You can now reject documents which not provide a `timestamp` value by setting `ignore_missing` to false (default to `true`):

```js
{
    "tweet" : {
        "_timestamp" : {
            "enabled" : true,
            "ignore_missing" : false
        }
    }
}
```

When you update the cluster to 1.5 or master, this index created with 1.4 we automatically migrate an index created with 1.4 to the 1.5 syntax.

Let say you have defined this in elasticsearch 1.4.x:

```js
DELETE test
PUT test
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
PUT test/type/_mapping
{
  "type" : {
      "_timestamp" : {
          "enabled" : true,
          "default" : null
      }
  }
}
```

After migration, the mapping become:

```js
{
   "test": {
      "mappings": {
         "type": {
            "_timestamp": {
               "enabled": true,
               "store": false,
               "ignore_missing": false
            },
            "properties": {}
         }
      }
   }
}
```

Closes #8882.
2015-01-20 13:20:05 +01:00
..
all-field.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
analyzer-field.asciidoc [DOCS] Multiple doc fixes 2014-03-07 14:24:58 +01:00
field-names-field.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
id-field.asciidoc Docs: Update id-field.asciidoc 2014-10-17 15:17:24 +02:00
index-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
parent-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
routing-field.asciidoc Doc has store "false" not store "true" 2014-12-29 11:59:22 +01:00
size-field.asciidoc [DOCS] Changed all store:yes/no to store:true/false 2013-11-07 16:57:18 +01:00
source-field.asciidoc Update source-field.asciidoc 2014-10-29 14:51:05 +01:00
timestamp-field.asciidoc [Mapper] Add `ignore_missing` option to `timestamp` 2015-01-20 13:20:05 +01:00
ttl-field.asciidoc Docs: _ttl ignores all parameters except for enabled and default. 2014-08-21 16:16:02 +02:00
type-field.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
uid-field.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00