Skip to content

Commit cf56f05

Browse files
committed
Merge pull request #596 from ddechant/master
Write DateFormat attribute to json
2 parents 1d651dd + e67ec57 commit cf56f05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public void VisitBaseAttribute(IElasticPropertyAttribute att) {
6868
this._jsonWriter.WritePropertyName("search_analyzer");
6969
this._jsonWriter.WriteValue(att.SearchAnalyzer);
7070
}
71+
if (!att.DateFormat.IsNullOrEmpty())
72+
{
73+
this._jsonWriter.WritePropertyName("format");
74+
this._jsonWriter.WriteValue(att.DateFormat);
75+
}
7176
if (att.Index != FieldIndexOption.analyzed)
7277
{
7378
this._jsonWriter.WritePropertyName("index");

0 commit comments

Comments
 (0)