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)
94
94
this . _Mapping . DocValues = docValues ;
95
95
return this ;
96
96
}
97
+
98
+ public DateMappingDescriptor < T > NumericResolution ( NumericResolutionUnit unit )
99
+ {
100
+ this . _Mapping . NumericResolution = unit ;
101
+ return this ;
102
+ }
97
103
}
98
104
}
Original file line number Diff line number Diff line change @@ -41,5 +41,8 @@ public DateMapping():base("date")
41
41
42
42
[ JsonProperty ( "doc_values" ) ]
43
43
public bool ? DocValues { get ; set ; }
44
+
45
+ [ JsonProperty ( "numeric_resolution" ) ]
46
+ public NumericResolutionUnit NumericResolution { get ; set ; }
44
47
}
45
48
}
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 406
406
<Compile Include =" Enums\GeoShapeRelation.cs" />
407
407
<Compile Include =" Enums\HighlighterType.cs" />
408
408
<Compile Include =" Enums\NormsLoading.cs" />
409
+ <Compile Include =" Enums\NumericResolutionUnit.cs" />
409
410
<Compile Include =" Enums\RangeExecution.cs" />
410
411
<Compile Include =" Enums\RoutingAllocationEnableOption.cs" />
411
412
<Compile Include =" Enums\ScriptLang.cs" />
Original file line number Diff line number Diff line change 11
11
"boost" : 1.3 ,
12
12
"null_value" : " 1986-03-08T00:00:00" ,
13
13
"include_in_all" : true ,
14
- "ignore_malformed" : true
14
+ "ignore_malformed" : true ,
15
+ "doc_values" : true ,
16
+ "numeric_resolution" : " seconds"
15
17
}
16
18
}
17
19
}
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ public void DateProperty()
92
92
. PrecisionStep ( 4 )
93
93
. Store ( )
94
94
. Boost ( 1.3 )
95
+ . DocValues ( )
96
+ . NumericResolution ( NumericResolutionUnit . Seconds )
95
97
)
96
98
)
97
99
) ;
You can’t perform that action at this time.
0 commit comments