Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping: Explicit _timestamp default null is set to now #9428

Merged
merged 1 commit into from
Jan 26, 2015

Commits on Jan 26, 2015

  1. 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-71534871
    dadoonet committed Jan 26, 2015
    Configuration menu
    Copy the full SHA
    b95fcd6 View commit details
    Browse the repository at this point in the history