@@ -19,6 +19,7 @@ public interface ITypeMapping
19
19
20
20
[ JsonProperty ( "transform" ) ]
21
21
[ JsonConverter ( typeof ( MappingTransformCollectionJsonConverter ) ) ]
22
+ [ Obsolete ( "Deprecated in 2.0. Will be removed in the next major version release." ) ]
22
23
IList < IMappingTransform > Transform { get ; set ; }
23
24
24
25
[ JsonProperty ( "analyzer" ) ]
@@ -108,6 +109,7 @@ public class TypeMapping : ITypeMapping
108
109
[ Obsolete ( "use a normal date field and set its value explicitly" ) ]
109
110
public ITimestampField TimestampField { get ; set ; }
110
111
/// <inheritdoc/>
112
+ [ Obsolete ( "Deprecated in 2.0. Will be removed in the next major version release." ) ]
111
113
public IList < IMappingTransform > Transform { get ; set ; }
112
114
/// <inheritdoc/>
113
115
[ Obsolete ( "will be replaced with a different implementation in a future version of Elasticsearch" ) ]
@@ -136,6 +138,7 @@ public class TypeMappingDescriptor<T> : DescriptorBase<TypeMappingDescriptor<T>,
136
138
ISourceField ITypeMapping . SourceField { get ; set ; }
137
139
[ Obsolete ( "use a normal date field and set its value explicitly" ) ]
138
140
ITimestampField ITypeMapping . TimestampField { get ; set ; }
141
+ [ Obsolete ( "Deprecated in 2.0. Will be removed in the next major version release." ) ]
139
142
IList < IMappingTransform > ITypeMapping . Transform { get ; set ; }
140
143
[ Obsolete ( "will be replaced with a different implementation in a future version of Elasticsearch" ) ]
141
144
ITtlField ITypeMapping . TtlField { get ; set ; }
@@ -198,25 +201,25 @@ public TypeMappingDescriptor<T> AutoMap(IPropertyVisitor visitor = null, int max
198
201
public TypeMappingDescriptor < T > NumericDetection ( bool detect = true ) => Assign ( a => a . NumericDetection = detect ) ;
199
202
200
203
/// <inheritdoc/>
201
- public TypeMappingDescriptor < T > Transform ( IEnumerable < IMappingTransform > transforms ) => Assign ( a => a . Transform = transforms . ToListOrNullIfEmpty ( ) ) ;
202
-
203
- /// <inheritdoc/>
204
- public TypeMappingDescriptor < T > Transform ( Func < MappingTransformsDescriptor , IPromise < IList < IMappingTransform > > > selector ) =>
205
- Assign ( a => a . Transform = selector ? . Invoke ( new MappingTransformsDescriptor ( ) ) ? . Value ) ;
204
+ public TypeMappingDescriptor < T > RoutingField ( Func < RoutingFieldDescriptor < T > , IRoutingField > routingFieldSelector ) => Assign ( a => a . RoutingField = routingFieldSelector ? . Invoke ( new RoutingFieldDescriptor < T > ( ) ) ) ;
206
205
207
206
/// <inheritdoc/>
208
- public TypeMappingDescriptor < T > RoutingField ( Func < RoutingFieldDescriptor < T > , IRoutingField > routingFieldSelector ) => Assign ( a => a . RoutingField = routingFieldSelector ? . Invoke ( new RoutingFieldDescriptor < T > ( ) ) ) ;
207
+ public TypeMappingDescriptor < T > FieldNamesField ( Func < FieldNamesFieldDescriptor < T > , IFieldNamesField > fieldNamesFieldSelector ) => Assign ( a => a . FieldNamesField = fieldNamesFieldSelector . Invoke ( new FieldNamesFieldDescriptor < T > ( ) ) ) ;
209
208
210
209
#pragma warning disable 618
211
210
/// <inheritdoc/>
212
211
[ Obsolete ( "use a normal date field and set its value explicitly" ) ]
213
212
public TypeMappingDescriptor < T > TimestampField ( Func < TimestampFieldDescriptor < T > , ITimestampField > timestampFieldSelector ) => Assign ( a => a . TimestampField = timestampFieldSelector ? . Invoke ( new TimestampFieldDescriptor < T > ( ) ) ) ;
214
- #pragma warning restore 618
215
213
216
214
/// <inheritdoc/>
217
- public TypeMappingDescriptor < T > FieldNamesField ( Func < FieldNamesFieldDescriptor < T > , IFieldNamesField > fieldNamesFieldSelector ) => Assign ( a => a . FieldNamesField = fieldNamesFieldSelector . Invoke ( new FieldNamesFieldDescriptor < T > ( ) ) ) ;
215
+ [ Obsolete ( "Deprecated in 2.0. Will be removed in the next major version release." ) ]
216
+ public TypeMappingDescriptor < T > Transform ( IEnumerable < IMappingTransform > transforms ) => Assign ( a => a . Transform = transforms . ToListOrNullIfEmpty ( ) ) ;
217
+
218
+ /// <inheritdoc/>
219
+ [ Obsolete ( "Deprecated in 2.0. Will be removed in the next major version release." ) ]
220
+ public TypeMappingDescriptor < T > Transform ( Func < MappingTransformsDescriptor , IPromise < IList < IMappingTransform > > > selector ) =>
221
+ Assign ( a => a . Transform = selector ? . Invoke ( new MappingTransformsDescriptor ( ) ) ? . Value ) ;
218
222
219
- #pragma warning disable 618
220
223
/// <inheritdoc/>
221
224
[ Obsolete ( "will be replaced with a different implementation in a future version of Elasticsearch" ) ]
222
225
public TypeMappingDescriptor < T > TtlField ( Func < TtlFieldDescriptor , ITtlField > ttlFieldSelector ) => Assign ( a => a . TtlField = ttlFieldSelector ? . Invoke ( new TtlFieldDescriptor ( ) ) ) ;
0 commit comments