Skip to content

Commit 3f2700f

Browse files
committed
remove support for the mapper plugin
1 parent aed8ef2 commit 3f2700f

File tree

23 files changed

+38
-637
lines changed

23 files changed

+38
-637
lines changed

src/Nest/Mapping/DynamicTemplate/SingleMapping.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ public IProperty Boolean(Func<BooleanPropertyDescriptor<T>, IBooleanProperty> se
3434
public IProperty Binary(Func<BinaryPropertyDescriptor<T>, IBinaryProperty> selector) =>
3535
selector?.Invoke(new BinaryPropertyDescriptor<T>());
3636

37-
public IProperty Attachment(Func<AttachmentPropertyDescriptor<T>, IAttachmentProperty> selector) =>
38-
selector?.Invoke(new AttachmentPropertyDescriptor<T>());
39-
4037
public IProperty Object<TChild>(Func<ObjectTypeDescriptor<T, TChild>, IObjectProperty> selector)
4138
where TChild : class => selector?.Invoke(new ObjectTypeDescriptor<T, TChild>());
4239

src/Nest/Mapping/Types/FieldType.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ public enum FieldType
2020
[EnumMember(Value = "geo_shape")]
2121
GeoShape,
2222
/// <summary>
23-
/// The attachment type allows to index different “attachment” type field (encoded as base64), for example, microsoft office formats, open document formats, ePub, HTML...
24-
/// </summary>
25-
[EnumMember(Value = "attachment")]
26-
Attachment,
27-
/// <summary>
2823
/// An ip mapping type allows to store ipv4 addresses in a numeric form allowing to easily sort, and range query it (using ip values).
2924
/// </summary>
3025
[EnumMember(Value = "ip")]

src/Nest/Mapping/Types/Properties.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public partial interface IPropertiesDescriptor<T, out TReturnType>
5151
TReturnType Date(Func<DatePropertyDescriptor<T>, IDateProperty> selector);
5252
TReturnType Boolean(Func<BooleanPropertyDescriptor<T>, IBooleanProperty> selector);
5353
TReturnType Binary(Func<BinaryPropertyDescriptor<T>, IBinaryProperty> selector);
54-
TReturnType Attachment(Func<AttachmentPropertyDescriptor<T>, IAttachmentProperty> selector);
5554
TReturnType Object<TChild>(Func<ObjectTypeDescriptor<T, TChild>, IObjectProperty> selector)
5655
where TChild : class;
5756
TReturnType Nested<TChild>(Func<NestedPropertyDescriptor<T, TChild>, INestedProperty> selector)
@@ -98,8 +97,6 @@ public PropertiesDescriptor() : base(new Properties<T>()) { }
9897

9998
public PropertiesDescriptor<T> Binary(Func<BinaryPropertyDescriptor<T>, IBinaryProperty> selector) => SetProperty(selector);
10099

101-
public PropertiesDescriptor<T> Attachment(Func<AttachmentPropertyDescriptor<T>, IAttachmentProperty> selector) => SetProperty(selector);
102-
103100
public PropertiesDescriptor<T> Object<TChild>(Func<ObjectTypeDescriptor<T, TChild>, IObjectProperty> selector)
104101
where TChild : class => SetProperty(selector);
105102

src/Nest/Mapping/Types/PropertyJsonConverter.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
6565
return jObject.ToObject<GeoPointProperty>();
6666
case FieldType.GeoShape:
6767
return jObject.ToObject<GeoShapeProperty>();
68-
case FieldType.Attachment:
69-
return jObject.ToObject<AttachmentProperty>();
7068
case FieldType.Completion:
7169
return jObject.ToObject<CompletionProperty>();
7270
case FieldType.TokenCount:

src/Nest/Mapping/Types/Specialized/Attachment/AttachmentAttribute.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Nest/Mapping/Types/Specialized/Attachment/AttachmentProperty.cs

Lines changed: 0 additions & 140 deletions
This file was deleted.

src/Nest/Mapping/Visitor/IMappingVisitor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public interface IMappingVisitor
1919
void Visit(IIpProperty property);
2020
void Visit(IGeoPointProperty property);
2121
void Visit(IGeoShapeProperty property);
22-
void Visit(IAttachmentProperty property);
2322
void Visit(INumberProperty property);
2423
void Visit(ICompletionProperty property);
2524
void Visit(IMurmur3HashProperty property);
@@ -64,8 +63,6 @@ public virtual void Visit(IGeoPointProperty property) { }
6463

6564
public virtual void Visit(IGeoShapeProperty property) { }
6665

67-
public virtual void Visit(IAttachmentProperty property) { }
68-
6966
public virtual void Visit(ICompletionProperty property) { }
7067

7168
public virtual void Visit(IMurmur3HashProperty property) { }

src/Nest/Mapping/Visitor/IPropertyVisitor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public interface IPropertyVisitor
1717
void Visit(IObjectProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
1818
void Visit(IGeoPointProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
1919
void Visit(IGeoShapeProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
20-
void Visit(IAttachmentProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
2120
void Visit(ICompletionProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
2221
void Visit(IIpProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);
2322
void Visit(IMurmur3HashProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute);

src/Nest/Mapping/Visitor/MappingWalker.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@ public void Accept(IProperties properties)
148148
this.Accept(t.Fields);
149149
});
150150
break;
151-
case FieldType.Attachment:
152-
this.Visit<IAttachmentProperty>(field, t =>
153-
{
154-
this._visitor.Visit(t);
155-
this.Accept(t.Fields);
156-
});
157-
break;
158151
case FieldType.Completion:
159152
this.Visit<ICompletionProperty>(field, t =>
160153
{

src/Nest/Mapping/Visitor/NoopPropertyVisitor.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ public virtual void Visit(IIpProperty type, PropertyInfo propertyInfo, Elasticse
3636
{
3737
}
3838

39-
public virtual void Visit(IAttachmentProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute)
40-
{
41-
}
42-
4339
public virtual void Visit(IGeoPointProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute)
4440
{
4541
}
@@ -106,10 +102,6 @@ public void Visit(IProperty type, PropertyInfo propertyInfo, ElasticsearchProper
106102
if (keywordType != null)
107103
Visit(keywordType, propertyInfo, attribute);
108104

109-
var attachmentType = type as IAttachmentProperty;
110-
if (attachmentType != null)
111-
Visit(attachmentType, propertyInfo, attribute);
112-
113105
var geoShapeType = type as IGeoShapeProperty;
114106
if (geoShapeType != null)
115107
Visit(geoShapeType, propertyInfo, attribute);

0 commit comments

Comments
 (0)