Commit b95fcd6
committed
Explicit _timestamp default null is set to now
When creating an index with:
```
PUT new_index
{
"mappings": {
"power": {
"_timestamp" : {
"enabled" : true,
"default": null
}
}
}
}
```
When restarting the cluster, `now` is applied instead of `null`. So index become:
```
{
"mappings": {
"power": {
"_timestamp" : {
"enabled" : true,
"default": "now"
}
}
}
}
```
This PR fix that and applies `null` when it was explicitly set.
Note that this won't happen anymore in 1.5 as `null` is not allowed anymore as a `default` value. See elastic#9104.
See also:
* elastic#7036
* elastic#9049
* elastic#9426#issuecomment-715348711 parent c799e19 commit b95fcd6
File tree
2 files changed
+5
-3
lines changed- src
- main/java/org/elasticsearch/cluster/metadata
- test/java/org/elasticsearch/index/mapper/timestamp
2 files changed
+5
-3
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
| 357 | + | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
| |||
0 commit comments