OpenSearch/docs/reference/mapping
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
..
fields [Mapper] Add `ignore_missing` option to `timestamp` 2015-01-20 13:20:05 +01:00
types [GEO] Add optional left/right parameter to GeoJSON 2014-12-22 12:09:45 -06:00
conf-mappings.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
date-format.asciidoc Settings: Remove `mapping.date.round_ceil` setting for date math parsing 2014-12-15 13:13:45 -08:00
dynamic-mapping.asciidoc Docs: Fix incorrect documentation for the `index.query.parse.allow_unmapped_fields` setting. 2014-11-11 15:13:55 +00:00
fields.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
meta.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
transform.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
types.asciidoc Replaced the multi-field type in favour for the multi fields option that can be set on any core field. 2014-01-13 09:21:53 +01:00