diff --git a/src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs b/src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs index c5d805ac182..1d4952f0095 100644 --- a/src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs +++ b/src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs @@ -68,6 +68,11 @@ public void VisitBaseAttribute(IElasticPropertyAttribute att) { this._jsonWriter.WritePropertyName("search_analyzer"); this._jsonWriter.WriteValue(att.SearchAnalyzer); } + if (!att.DateFormat.IsNullOrEmpty()) + { + this._jsonWriter.WritePropertyName("format"); + this._jsonWriter.WriteValue(att.DateFormat); + } if (att.Index != FieldIndexOption.analyzed) { this._jsonWriter.WritePropertyName("index");