-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Store index creation time in index metadata #7218
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
Conversation
Although my comment is not directly related to the PR, I think that if we can also support
Related to #3933 |
@@ -363,6 +363,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws | |||
|
|||
builder.field("state", indexMetaData.state().toString().toLowerCase(Locale.ENGLISH)); | |||
|
|||
builder.field("creation_date", indexMetaData.creationDate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should rather be part of the index meta data settings? (like the created version and the uuid?)
Left one comment but other than that it looks good to me. |
@@ -556,6 +574,7 @@ public static void toXContent(IndexMetaData indexMetaData, XContentBuilder build | |||
builder.startObject(indexMetaData.index(), XContentBuilder.FieldCaseConversion.NONE); | |||
|
|||
builder.field("version", indexMetaData.version()); | |||
builder.field("creation_date", indexMetaData.creationDate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is needed, it will be serialized as part of the settings?
This change stores the index creation time in the index metadata when an index is created. The creation time cannot be changed but can be set as part of the create index request to allow for correct creation times for historical data. Closes #7119
This change stores the index creation time in the index metadata when an index is created. The creation time cannot be changed but can be set as part of the create index request to allow for correct creation times for historical data.
Closes #7119