File tree Expand file tree Collapse file tree 6 files changed +34
-1
lines changed
Tests/Nest.Tests.Unit/Core/Map/Properties Expand file tree Collapse file tree 6 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -94,5 +94,11 @@ public DateMappingDescriptor<T> DocValues(bool docValues = true)
9494 this . _Mapping . DocValues = docValues ;
9595 return this ;
9696 }
97+
98+ public DateMappingDescriptor < T > NumericResolution ( NumericResolutionUnit unit )
99+ {
100+ this . _Mapping . NumericResolution = unit ;
101+ return this ;
102+ }
97103 }
98104}
Original file line number Diff line number Diff line change @@ -41,5 +41,8 @@ public DateMapping():base("date")
4141
4242 [ JsonProperty ( "doc_values" ) ]
4343 public bool ? DocValues { get ; set ; }
44+
45+ [ JsonProperty ( "numeric_resolution" ) ]
46+ public NumericResolutionUnit NumericResolution { get ; set ; }
4447 }
4548}
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+ using Newtonsoft . Json . Converters ;
3+ using System ;
4+ using System . Collections . Generic ;
5+ using System . Linq ;
6+ using System . Runtime . Serialization ;
7+ using System . Text ;
8+
9+ namespace Nest
10+ {
11+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
12+ public enum NumericResolutionUnit
13+ {
14+ [ EnumMember ( Value = "milliseconds" ) ]
15+ Milliseconds ,
16+ [ EnumMember ( Value = "seconds" ) ]
17+ Seconds
18+ }
19+ }
Original file line number Diff line number Diff line change 406406 <Compile Include =" Enums\GeoShapeRelation.cs" />
407407 <Compile Include =" Enums\HighlighterType.cs" />
408408 <Compile Include =" Enums\NormsLoading.cs" />
409+ <Compile Include =" Enums\NumericResolutionUnit.cs" />
409410 <Compile Include =" Enums\RangeExecution.cs" />
410411 <Compile Include =" Enums\RoutingAllocationEnableOption.cs" />
411412 <Compile Include =" Enums\ScriptLang.cs" />
Original file line number Diff line number Diff line change 1111 "boost" : 1.3 ,
1212 "null_value" : " 1986-03-08T00:00:00" ,
1313 "include_in_all" : true ,
14- "ignore_malformed" : true
14+ "ignore_malformed" : true ,
15+ "doc_values" : true ,
16+ "numeric_resolution" : " seconds"
1517 }
1618 }
1719 }
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ public void DateProperty()
9292 . PrecisionStep ( 4 )
9393 . Store ( )
9494 . Boost ( 1.3 )
95+ . DocValues ( )
96+ . NumericResolution ( NumericResolutionUnit . Seconds )
9597 )
9698 )
9799 ) ;
You can’t perform that action at this time.
0 commit comments