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

Comments

Projects
None yet
6 participants
@ppf2
Copy link
Member

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.

@jpountz jpountz added v2.0.0 labels May 6, 2014

@kevinkluge kevinkluge added v1.3.0 and removed v1.2.0 labels May 12, 2014

@s1monw s1monw added v1.4.0 and removed v1.3.0 labels Jul 14, 2014

@jpountz jpountz removed the adoptme label Aug 1, 2014

@brwe

This comment has been minimized.

Copy link
Contributor

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

_timestamp: enable mapper properties merging
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 in ee5221b Sep 8, 2014

brwe added a commit that referenced this issue Sep 8, 2014

_timestamp: enable mapper properties merging
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
You can’t perform that action at this time.