File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -500,13 +500,15 @@ public boolean isDataStreamTimestampFieldEnabled() {
500500 }
501501
502502 /**
503- * Returns if this mapping contains a timestamp field that is of type date, indexed and has doc values.
504- * @return {@code true} if contains a timestamp field of type date that is indexed and has doc values, {@code false} otherwise.
503+ * Returns if this mapping contains a timestamp field that is of type date, has doc values, and is either indexed or uses a doc values
504+ * skipper.
505+ * @return {@code true} if contains a timestamp field of type date that has doc values and is either indexed or uses a doc values
506+ * skipper, {@code false} otherwise.
505507 */
506508 public boolean hasTimestampField () {
507509 final MappedFieldType mappedFieldType = fieldTypesLookup ().get (DataStream .TIMESTAMP_FIELD_NAME );
508- if (mappedFieldType instanceof DateFieldMapper .DateFieldType ) {
509- return mappedFieldType . isIndexed () && mappedFieldType . hasDocValues ( );
510+ if (mappedFieldType instanceof DateFieldMapper .DateFieldType dateMappedFieldType ) {
511+ return dateMappedFieldType . hasDocValues () && ( dateMappedFieldType . isIndexed () || dateMappedFieldType . hasDocValuesSkipper () );
510512 } else {
511513 return false ;
512514 }
You can’t perform that action at this time.
0 commit comments