File tree Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,18 @@ public GeoShapeMappingDescriptor<T> TreeLevels(int treeLevels)
3030 return this ;
3131 }
3232
33+ public GeoShapeMappingDescriptor < T > Precision ( GeoPrecision precision )
34+ {
35+ this . _Mapping . Precision = precision ;
36+ return this ;
37+ }
38+
39+ public GeoShapeMappingDescriptor < T > Orientation ( GeoOrientation orientation )
40+ {
41+ this . _Mapping . Orientation = orientation ;
42+ return this ;
43+ }
44+
3345 public GeoShapeMappingDescriptor < T > DistanceErrorPercentage ( double distanceErrorPercentage )
3446 {
3547 this . _Mapping . DistanceErrorPercentage = distanceErrorPercentage ;
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ public class GeoShapeMapping : IElasticType
1919 [ JsonProperty ( "tree" ) , JsonConverter ( typeof ( StringEnumConverter ) ) ]
2020 public GeoTree ? Tree { get ; set ; }
2121
22+ [ JsonProperty ( "precision" ) ]
23+ public GeoPrecision ? Precision { get ; set ; }
24+
25+ [ JsonProperty ( "orientation" ) ]
26+ public GeoOrientation ? Orientation { get ; set ; }
27+
2228 [ JsonProperty ( "tree_levels" ) ]
2329 public int ? TreeLevels { get ; set ; }
2430
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+ using Newtonsoft . Json . Converters ;
3+ using System . Runtime . Serialization ;
4+
5+ namespace Nest
6+ {
7+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
8+ public enum GeoOrientation
9+ {
10+ [ EnumMember ( Value = "cw" ) ]
11+ ClockWise ,
12+ [ EnumMember ( Value = "ccw" ) ]
13+ CounterClockWise
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+ using Newtonsoft . Json . Converters ;
3+ using System . Runtime . Serialization ;
4+
5+ namespace Nest
6+ {
7+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
8+ public enum GeoPrecision
9+ {
10+ [ EnumMember ( Value = "in" ) ]
11+ Inch ,
12+ [ EnumMember ( Value = "yd" ) ]
13+ Yard ,
14+ [ EnumMember ( Value = "mi" ) ]
15+ Miles ,
16+ [ EnumMember ( Value = "km" ) ]
17+ Kilometers ,
18+ [ EnumMember ( Value = "m" ) ]
19+ Meters ,
20+ [ EnumMember ( Value = "cm" ) ]
21+ Centimeters ,
22+ [ EnumMember ( Value = "mm" ) ]
23+ Millimeters
24+ }
25+ }
Original file line number Diff line number Diff line change 242242 <Compile Include =" DSL\Filter\GeoHashCellFilterDescriptor.cs" />
243243 <Compile Include =" DSL\DeleteScriptDescriptor.cs" />
244244 <Compile Include =" ElasticClient-GetIndex.cs" />
245+ <Compile Include =" Enums\GeoOrientation.cs" />
246+ <Compile Include =" Enums\GeoPrecision.cs" />
245247 <Compile Include =" Enums\GetIndexFeature.cs" />
246248 <Compile Include =" DSL\GetScriptDescriptor.cs" />
247249 <Compile Include =" DSL\SearchExistsDescriptor.cs" />
You can’t perform that action at this time.
0 commit comments