File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Nest/Domain/Mapping/SpecialFields
Tests/Nest.Tests.Unit/Core/Map/TimestampField Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public interface ITimestampFieldMapping : ISpecialField
2424 bool ? IgnoreMissing { get ; set ; }
2525
2626 [ JsonProperty ( "store" ) ]
27- bool Store { get ; set ; }
27+ bool ? Store { get ; set ; }
2828 }
2929
3030 public class TimestampFieldMapping : ITimestampFieldMapping
@@ -36,7 +36,7 @@ public class TimestampFieldMapping : ITimestampFieldMapping
3636 public string Format { get ; set ; }
3737 public string Default { get ; set ; }
3838 public bool ? IgnoreMissing { get ; set ; }
39- public bool Store { get ; set ; }
39+ public bool ? Store { get ; set ; }
4040 }
4141
4242
@@ -51,15 +51,15 @@ public class TimestampFieldMappingDescriptor<T> : ITimestampFieldMapping
5151 string ITimestampFieldMapping . Format { get ; set ; }
5252 string ITimestampFieldMapping . Default { get ; set ; }
5353 bool ? ITimestampFieldMapping . IgnoreMissing { get ; set ; }
54- bool ITimestampFieldMapping . Store { get ; set ; }
54+ bool ? ITimestampFieldMapping . Store { get ; set ; }
5555
5656 public TimestampFieldMappingDescriptor < T > Enabled ( bool enabled = true )
5757 {
5858 Self . Enabled = enabled ;
5959 return this ;
6060 }
6161
62- public TimestampFieldMappingDescriptor < T > Store ( bool store = false )
62+ public TimestampFieldMappingDescriptor < T > Store ( bool store = true )
6363 {
6464 Self . Store = store ;
6565 return this ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public void TimestampFieldUsingString()
2525 . TimestampField ( a => a
2626 . Path ( "my_difficult_field_name" )
2727 . Enabled ( )
28+ . Store ( )
2829 )
2930 ) ;
3031 this . JsonEquals ( result . ConnectionStatus . Request , MethodInfo . GetCurrentMethod ( ) ) ;
Original file line number Diff line number Diff line change 22 "elasticsearchprojects" : {
33 "_timestamp" : {
44 "enabled" : true ,
5- "path" : " my_difficult_field_name"
5+ "path" : " my_difficult_field_name" ,
6+ "store" : true
67 }
78 }
89}
You can’t perform that action at this time.
0 commit comments