Browse Source

Use TimestampField.FIXED_TIMESTAMP_FIELD constant to refer to timestamp field name (#84398)

weizijun 3 years ago
parent
commit
372a8b6741

+ 2 - 1
server/src/main/java/org/elasticsearch/cluster/metadata/IndexAbstraction.java

@@ -9,6 +9,7 @@ package org.elasticsearch.cluster.metadata;
 
 import org.elasticsearch.action.DocWriteRequest;
 import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.cluster.metadata.DataStream.TimestampField;
 import org.elasticsearch.common.ParsingException;
 import org.elasticsearch.common.time.DateFormatters;
 import org.elasticsearch.core.Nullable;
@@ -332,7 +333,7 @@ public interface IndexAbstraction {
     class DataStream implements IndexAbstraction {
 
         public static final XContentParserConfiguration TS_EXTRACT_CONFIG = XContentParserConfiguration.EMPTY.withFiltering(
-            Set.of("@timestamp"),
+            Set.of(TimestampField.FIXED_TIMESTAMP_FIELD),
             null,
             false
         );