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

Improve handling of store parameter updates post indexing #5772

Closed
ppf2 opened this issue Apr 10, 2014 · 1 comment
Closed

Improve handling of store parameter updates post indexing #5772

ppf2 opened this issue Apr 10, 2014 · 1 comment

Comments

@ppf2
Copy link
Member

ppf2 commented Apr 10, 2014

DELETE /myindex
POST /myindex/mytype/1
{
  "prop1":"test1"
}
GET /myindex/_search
{
  "fields": [
    "_timestamp"
  ], 
  "query": {
    "match_all": {}
  }
}
PUT /myindex/mytype/_mapping
{

  "mytype": {
    "_timestamp": {
    "enabled": "true",
    "store": "true"
    }
  }
}
GET /myindex/mytype/_mapping

If you create an index, put a doc into it, and then try to update the mapping to enable _timestamp and set store:true, you will notice that the response comes back as acknowledged:true with no error messages. But if you get the _mapping back, you will notice that store:true is not set (by design because we do not allow changing the store parameter post indexing).

For regular properties, if you attempt to update its store parameter post indexing, it will actually throw a 400 error indicating a MergeMappingException because of differences in store values.

It will be nice to add the same validation and throw a similar error when users attempt to update the store value of _timestamp post-indexing.

@brwe
Copy link
Contributor

brwe commented Aug 4, 2014

Seems to the the same issue as #777

brwe added a commit to brwe/elasticsearch that referenced this issue Sep 5, 2014
Updates on the _timestamp field were silently ignored.
Now _timestamp undergoes the same merge as regular
fields. This includes exceptions if a prroperty cannot
be changed.
"path" and "default" cannot be changed.

closes elastic#5772
closes elastic#6958
partially fixes elastic#777
@brwe brwe closed this as completed in ee5221b Sep 8, 2014
brwe added a commit that referenced this issue Sep 8, 2014
Updates on the _timestamp field were silently ignored.
Now _timestamp undergoes the same merge as regular
fields. This includes exceptions if a property cannot
be changed.
"path" and "default" cannot be changed.

closes #5772
closes #6958
closes #7614
partially fixes #777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants