Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix time series timestamp meta missing (#80695)
I find a time series timestamp meta missing case. here is the reproduce steps: 1. create a time_series index, and set the timestamp field some meta. 2. index a doc with a new field that is not in mappings, it will call mappings marge. 3. then the timestamp field meta is missing. the reason that meta is missing is when a new field comes, `MappingParser.parse` will build a new mapping with new fields. And merge the new mappings with exist mapping. the new mapping have no timestamp field, so it will auto add timestamp field, the timestamp is without user's meta info. And merge method build a new timestamp field to override the user's timestamp field. It cause the timestamp meta missing. I fixed the case, by move timestamp logic from MappingParser.parse to create index logic. And move the tests to a new IT test. I add a test to test case, TimeSeriesModeIT.testAddTimeStampMeta will fail in the pre-commit.
- Loading branch information