Skip to content

Commit 8aa17ee

Browse files
committed
Set obsolete warning on GeoShape properties. #3770
1 parent c9bcf09 commit 8aa17ee

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Nest/Mapping/Types/Geo/GeoShape/GeoShapeProperty.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Diagnostics;
23
using System.Runtime.Serialization;
34
using Elasticsearch.Net;
@@ -24,6 +25,7 @@ public interface IGeoShapeProperty : IDocValuesProperty
2425
/// noting that large shapes will have greater false positives.
2526
/// </remarks>
2627
[DataMember(Name ="distance_error_pct")]
28+
[Obsolete("Removed in Elasticsearch 6.6")]
2729
double? DistanceErrorPercentage { get; set; }
2830

2931
/// <summary>
@@ -64,6 +66,7 @@ public interface IGeoShapeProperty : IDocValuesProperty
6466
/// so that geo_shape queries are optimal on a point only field.
6567
/// </summary>
6668
[DataMember(Name ="points_only")]
69+
[Obsolete("Removed in Elasticsearch 6.6")]
6770
bool? PointsOnly { get; set; }
6871

6972
/// <summary>
@@ -72,6 +75,7 @@ public interface IGeoShapeProperty : IDocValuesProperty
7275
/// the best tree_levels value to honor this precision.
7376
/// </summary>
7477
[DataMember(Name ="precision")]
78+
[Obsolete("Removed in Elasticsearch 6.6")]
7579
Distance Precision { get; set; }
7680

7781
/// <summary>
@@ -87,6 +91,7 @@ public interface IGeoShapeProperty : IDocValuesProperty
8791
/// Defaults to <see cref="GeoTree.Geohash" />
8892
/// </summary>
8993
[DataMember(Name ="tree")]
94+
[Obsolete("Removed in Elasticsearch 6.6")]
9095
GeoTree? Tree { get; set; }
9196

9297
/// <summary>
@@ -97,6 +102,7 @@ public interface IGeoShapeProperty : IDocValuesProperty
97102
/// <see cref="Precision" /> parameter instead.
98103
/// </summary>
99104
[DataMember(Name ="tree_levels")]
105+
[Obsolete("Removed in Elasticsearch 6.6")]
100106
int? TreeLevels { get; set; }
101107

102108
/// <summary>
@@ -113,6 +119,7 @@ public class GeoShapeProperty : DocValuesPropertyBase, IGeoShapeProperty
113119
public GeoShapeProperty() : base(FieldType.GeoShape) { }
114120

115121
/// <inheritdoc />
122+
[Obsolete("Removed in Elasticsearch 6.6")]
116123
public double? DistanceErrorPercentage { get; set; }
117124

118125
/// <inheritdoc />
@@ -125,18 +132,22 @@ public GeoShapeProperty() : base(FieldType.GeoShape) { }
125132
public GeoOrientation? Orientation { get; set; }
126133

127134
/// <inheritdoc />
135+
[Obsolete("Removed in Elasticsearch 6.6")]
128136
public bool? PointsOnly { get; set; }
129137

130138
/// <inheritdoc />
139+
[Obsolete("Removed in Elasticsearch 6.6")]
131140
public Distance Precision { get; set; }
132141

133142
/// <inheritdoc />
134143
public GeoStrategy? Strategy { get; set; }
135144

136145
/// <inheritdoc />
146+
[Obsolete("Removed in Elasticsearch 6.6")]
137147
public GeoTree? Tree { get; set; }
138148

139149
/// <inheritdoc />
150+
[Obsolete("Removed in Elasticsearch 6.6")]
140151
public int? TreeLevels { get; set; }
141152

142153
/// <inheritdoc />
@@ -151,38 +162,54 @@ public class GeoShapePropertyDescriptor<T>
151162
{
152163
public GeoShapePropertyDescriptor() : base(FieldType.GeoShape) { }
153164

165+
166+
[Obsolete("Removed in Elasticsearch 6.6")]
154167
double? IGeoShapeProperty.DistanceErrorPercentage { get; set; }
155168
bool? IGeoShapeProperty.IgnoreMalformed { get; set; }
156169
bool? IGeoShapeProperty.IgnoreZValue { get; set; }
157170
GeoOrientation? IGeoShapeProperty.Orientation { get; set; }
171+
172+
[Obsolete("Removed in Elasticsearch 6.6")]
158173
bool? IGeoShapeProperty.PointsOnly { get; set; }
174+
175+
[Obsolete("Removed in Elasticsearch 6.6")]
159176
Distance IGeoShapeProperty.Precision { get; set; }
160177
GeoStrategy? IGeoShapeProperty.Strategy { get; set; }
178+
179+
[Obsolete("Removed in Elasticsearch 6.6")]
161180
GeoTree? IGeoShapeProperty.Tree { get; set; }
181+
182+
[Obsolete("Removed in Elasticsearch 6.6")]
162183
int? IGeoShapeProperty.TreeLevels { get; set; }
163184
bool? IGeoShapeProperty.Coerce { get; set; }
164185

165186
/// <inheritdoc cref="IGeoShapeProperty.Tree" />
187+
188+
[Obsolete("Removed in Elasticsearch 6.6")]
166189
public GeoShapePropertyDescriptor<T> Tree(GeoTree? tree) => Assign(tree, (a, v) => a.Tree = v);
167190

168191
/// <inheritdoc cref="IGeoShapeProperty.TreeLevels" />
192+
[Obsolete("Removed in Elasticsearch 6.6")]
169193
public GeoShapePropertyDescriptor<T> TreeLevels(int? treeLevels) => Assign(treeLevels, (a, v) => a.TreeLevels = v);
170194

171195
/// <inheritdoc cref="IGeoShapeProperty.Strategy" />
172196
public GeoShapePropertyDescriptor<T> Strategy(GeoStrategy? strategy) => Assign(strategy, (a, v) => a.Strategy = v);
173197

174198
/// <inheritdoc cref="IGeoShapeProperty.Precision" />
199+
[Obsolete("Removed in Elasticsearch 6.6")]
175200
public GeoShapePropertyDescriptor<T> Precision(double precision, DistanceUnit unit) =>
176201
Assign(new Distance(precision, unit), (a, v) => a.Precision = v);
177202

178203
/// <inheritdoc cref="IGeoShapeProperty.Orientation" />
179204
public GeoShapePropertyDescriptor<T> Orientation(GeoOrientation? orientation) => Assign(orientation, (a, v) => a.Orientation = v);
180205

181206
/// <inheritdoc cref="IGeoShapeProperty.DistanceErrorPercentage" />
207+
[Obsolete("Removed in Elasticsearch 6.6")]
182208
public GeoShapePropertyDescriptor<T> DistanceErrorPercentage(double? distanceErrorPercentage) =>
183209
Assign(distanceErrorPercentage, (a, v) => a.DistanceErrorPercentage = v);
184210

185211
/// <inheritdoc cref="IGeoShapeProperty.PointsOnly" />
212+
[Obsolete("Removed in Elasticsearch 6.6")]
186213
public GeoShapePropertyDescriptor<T> PointsOnly(bool? pointsOnly = true) => Assign(pointsOnly, (a, v) => a.PointsOnly = v);
187214

188215
/// <inheritdoc cref="IGeoShapeProperty.IgnoreMalformed" />

0 commit comments

Comments
 (0)